Misc.LongString(3)
π Misc.LongString(3) β the OCaml library one, bestie π
Okay so real talk, we're in the OCaml library manual, section 3, and the page is literally called Misc.LongString. Yes, the NAME section is out here giving absolutely nothing, and I respect the mystery.
β¨ NAME β¨
Misc.LongString β no description
Like... that's it. That's the description. It said "no description" and honestly? Iconic. Lowkey a main character who refuses to introduce herself. π
π Module π
Module Misc.LongString
(Yes bestie, we're in a module called Misc.LongString. We love a nested moment. π«Ά)
πΈ Documentation πΈ
So the docs are like:
Module LongString
: sig end
Which is giving "the module signature is chillin' in here" energy. And inside it we've got these:
type t = bytes array
That's the type, t, and it's literally a bytes array. No cap. π¦
val create : int -> t
create takes an int and hands you back a t. Slay.
val length : t -> int
length goes from a t to an int. The way that it just does the thing. β¨
val get : t -> int -> char
get takes a t, then an int, and gives you a char. Cute.
val set : t -> int -> char -> unit
set takes a t, an int, a char, and returns unit. That's the whole vibe. unit says "I did it, no receipts". π
val blit : t -> int -> t -> int -> int -> unit
blit β bestie, look at all those arguments β t, int, t, int, int, and then unit. It's giving "I copy stuff, don't ask me more". π
val blit_string : string -> int -> t -> int -> int -> unit
blit_string is the string version: string, int, t, int, int, unit. Obsessed with the consistency, fr fr. π
val output : out_channel -> t -> int -> int -> unit
output takes an out_channel, a t, an int, an int, and returns unit. Very much "writing to a channel" energy. π₯
val input_bytes_into : t -> in_channel -> int -> unit
input_bytes_into takes a t, an in_channel, an int, and returns unit. The name says it all, and I'm not even gonna pretend otherwise. π§
val input_bytes : in_channel -> int -> t
input_bytes takes an in_channel, an int, and gives you a t. Periodt. β
Okay so tiny heads-up bestie: the original page lists these as bare val declarations with no extra prose, so I'm not out here inventing behavior. All the types are exactly as written, character for character. If you need the juicy implementation details, that's a different lore drop. π
Signed, sealed, delivered by OCamldoc, dated 2026-09-24, and stamped with the page name Misc.LongString(3) β mwah ππ
π¦ where this page comes from
- alpine 3.24: ocaml-doc 4.14.4-r0 Β· LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms