XML, JSON, HTML and Markdown libraries
Library cow_lib
Module type Cow_xml . Buffer
type string

The type for strings.

type t

The type for buffers.

exception Full

Raised if the buffer cannot be grown.

val create : int -> t

Creates a buffer of the given size.

val add_uchar : t -> int -> unit

Adds the given (guaranteed valid) unicode code point to a buffer.

Raises Full if the buffer cannot be grown.

val clear : t -> unit

Clears the buffer.

val contents : t -> string

Returns the buffer contents.

val length : t -> int

Returns the number of characters contained in the buffer.