`sig
type t = string
exception Malformed_code
val validate : UTF8.t -> unit
val get : UTF8.t -> int -> UChar.uchar
val init : int -> (int -> UChar.uchar) -> UTF8.t
val length : UTF8.t -> int
type index = int
val nth : UTF8.t -> int -> UTF8.index
val last : UTF8.t -> UTF8.index
val look : UTF8.t -> UTF8.index -> UChar.uchar
val substring : UTF8.t -> int -> int -> UTF8.t
val out_of_range : UTF8.t -> UTF8.index -> bool
val compare_index : UTF8.t -> UTF8.index -> UTF8.index -> int
val next : UTF8.t -> UTF8.index -> UTF8.index
val prev : UTF8.t -> UTF8.index -> UTF8.index
val move : UTF8.t -> UTF8.index -> int -> UTF8.index
val iter : (UChar.uchar -> unit) -> UTF8.t -> unit
val compare : UTF8.t -> UTF8.t -> int
module Buf :
sig
type buf
val create : int -> UTF8.Buf.buf
val contents : UTF8.Buf.buf -> UTF8.t
val clear : UTF8.Buf.buf -> unit
val reset : UTF8.Buf.buf -> unit
val add_char : UTF8.Buf.buf -> UChar.uchar -> unit
val add_string : UTF8.Buf.buf -> UTF8.t -> unit
val add_buffer : UTF8.Buf.buf -> UTF8.Buf.buf -> unit
end
end`