Batteries user guide : Extlib.UTF8

`sig
type t = string
exception Malformed_code
val validate : t -> unit
val get : t -> int -> BatUChar.t
val init : int -> (int -> BatUChar.t) -> t
val length : t -> int
type index = int
val nth : t -> int -> index
val first : t -> index
val last : t -> index
val look : t -> index -> BatUChar.t
val out_of_range : t -> index -> bool
val compare_index : t -> index -> index -> int
val next : t -> index -> index
val prev : t -> index -> index
val move : t -> index -> int -> index
val iter : (BatUChar.t -> unit) -> t -> unit
val compare : t -> t -> int
module Buf :
sig
type buf = Buffer.t
val create : int -> buf
val contents : buf -> t
val clear : buf -> unit
val reset : buf -> unit
val add_char : buf -> BatUChar.t -> unit
val add_string : buf -> t -> unit
val add_buffer : buf -> buf -> unit
end
val make : int -> BatUChar.t -> t
val of_string_unsafe : string -> t
val to_string_unsafe : t -> string
val of_char : BatUChar.t -> t
val empty : t
val sub : t -> int -> int -> t
val iteri : (BatUChar.t -> int -> unit) -> t -> unit
val fold : ('a -> BatUChar.t -> 'a) -> 'a -> t -> 'a
val map : (BatUChar.t -> BatUChar.t) -> t -> t
val filter_map : (BatUChar.t -> BatUChar.t option) -> t -> t
val filter : (BatUChar.t -> bool) -> t -> t
val rindex : t -> BatUChar.t -> int
val contains : t -> BatUChar.t -> bool
val escaped : t -> t
val of_latin1 : string -> t
val length0 : int -> int
module ByteIndex :
sig
type t = string
type b_idx = BatUTF8.ByteIndex.b_idx
type char_idx = int
val of_int_unsafe : int -> b_idx
val to_int : b_idx -> int
val next : t -> b_idx -> b_idx
val prev : t -> b_idx -> b_idx
val of_char_idx : t -> char_idx -> b_idx
val at_end : t -> b_idx -> bool
val out_of_range : t -> b_idx -> bool
val first : b_idx
val last : t -> b_idx
val move : t -> b_idx -> int -> b_idx
val look : t -> b_idx -> BatUChar.t
end
end`