Imandrakit_bytes.Byte_bufval create : ?cap:int -> unit -> tCreate a new buffer with given initial capacity.
val length : t -> intCurrent length.
val is_empty : t -> boolis_empty b is length b=0
val capacity : t -> intCurrent capacity (size of the array returned by bytes)
val clear : t -> unitClear the buffer, setting length to 0
val ensure_cap : t -> int -> unitensure_cap buf n ensures that capacity buf >= n.
val ensure_free : t -> int -> unitensure_free buf n ensures that at least n bytes are free at the end
val shrink_to : t -> int -> unitshrink_to buf n reduces length buf to at most n. Does nothing if the length is already <= n.
val add_char : t -> char -> unitPush a character at the end.
val to_slice : t -> Byte_slice.tval append_bytes : t -> bytes -> unitval append_subbytes : t -> bytes -> int -> int -> unitval append_string : t -> string -> unitval append_substring : t -> string -> int -> int -> unitval append_buf : t -> Stdlib.Buffer.t -> unitval append_seq : t -> char Stdlib.Seq.t -> unitval get : t -> int -> charval unsafe_get : t -> int -> charval set : t -> int -> char -> unitval unsafe_set : t -> int -> char -> unitval contents : t -> stringCopy the internal data to a string
val contents_bytes : t -> bytesCopy the internal data to a byte buffer
val iter : (char -> unit) -> t -> unitval fold_left : ('a -> char -> 'a) -> 'a -> t -> 'aval of_seq : char Stdlib.Seq.t -> tval to_seq : t -> char Stdlib.Seq.t