CCByte_bufferByte buffer.
A dynamic vector of bytes.
val 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 bytes : t -> bytesAccess the underlying byte buffer. This buffer can change after operations that affect the capacity (e.g. add_char).
val clear : t -> unitval ensure_cap : t -> int -> unitensure_cap self n ensures that capacity self >= n.
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 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