Module UTF8BufferImpl

module UTF8BufferImpl: sig .. end
Implementation of UTF8 buffers based on the Camomile library (available at http://camomile.sourceforge.net).

One is advised to use the Utils.UTF8Buffer module instead of this one.


type t 
The type of UTF8 buffers.
val default_size : int
The size of buffers created through make.
val make : unit -> t
Constructs an empty buffer, of size default_size.
val make_of_size : int -> t
make_of_size sz constructs an empty buffer, of size sz. Raises Invalid_argument if sz is negative.
val add_char : t -> UCharImpl.t -> unit
add_char b c appends char c to buffer b.
val add_string : t -> UTF8Impl.t -> unit
add_char b s appends string s to buffer b.
val add_endline : t -> UTF8Impl.t -> unit
add_char b s appends string s to buffer b, and then also appends and end-of-line character.
val contents : t -> UTF8Impl.t
contents b returns the contents of buffer b as an UTF8 string.