sig
type t = string
exception Invalid of string * string
val check : string -> string option
val validate : string -> unit
val encode : ?encoding:Encoding.t -> Text.t -> string
val decode : ?encoding:Encoding.t -> string -> Text.t
val to_ascii : Text.t -> Text.t
val length : Text.t -> int
val code : Text.t -> int
val char : int -> Text.t
val get : Text.t -> int -> Text.t
val sub : Text.t -> int -> int -> Text.t
val slice : Text.t -> int -> int -> Text.t
val splice : Text.t -> int -> int -> Text.t -> Text.t
val repeat : int -> Text.t -> Text.t
val init : int -> (int -> Text.t) -> Text.t
val rev_init : int -> (int -> Text.t) -> Text.t
val upper : Text.t -> Text.t
val lower : Text.t -> Text.t
val capitalize : Text.t -> Text.t
val uncapitalize : Text.t -> Text.t
val compare : Text.t -> Text.t -> int
val icompare : Text.t -> Text.t -> int
val transform : Text.t -> Text.t
val rev : Text.t -> Text.t
val concat : Text.t -> Text.t list -> Text.t
val rev_concat : Text.t -> Text.t list -> Text.t
val explode : Text.t -> Text.t list
val rev_explode : Text.t -> Text.t list
val implode : Text.t list -> Text.t
val rev_implode : Text.t list -> Text.t
val is_ascii : Text.t -> bool
val is_alnum : Text.t -> bool
val is_alpha : Text.t -> bool
val is_blank : Text.t -> bool
val is_cntrl : Text.t -> bool
val is_digit : Text.t -> bool
val is_graph : Text.t -> bool
val is_lower : Text.t -> bool
val is_print : Text.t -> bool
val is_punct : Text.t -> bool
val is_space : Text.t -> bool
val is_upper : Text.t -> bool
val is_xdigit : Text.t -> bool
val map : (Text.t -> Text.t) -> Text.t -> Text.t
val rev_map : (Text.t -> Text.t) -> Text.t -> Text.t
val fold : (Text.t -> 'a -> 'a) -> Text.t -> 'a -> 'a
val rev_fold : (Text.t -> 'a -> 'a) -> Text.t -> 'a -> 'a
val filter : (Text.t -> bool) -> Text.t -> Text.t
val rev_filter : (Text.t -> bool) -> Text.t -> Text.t
val iter : (Text.t -> unit) -> Text.t -> unit
val rev_iter : (Text.t -> unit) -> Text.t -> unit
val for_all : (Text.t -> bool) -> Text.t -> bool
val exists : (Text.t -> bool) -> Text.t -> bool
val count : (Text.t -> bool) -> Text.t -> int
val words : Text.t -> Text.t list
val lines : Text.t -> Text.t list
val split : ?max:int -> ?sep:Text.t -> Text.t -> Text.t list
val rev_split : ?max:int -> ?sep:Text.t -> Text.t -> Text.t list
val replace : Text.t -> patt:Text.t -> repl:Text.t -> Text.t
val contains : Text.t -> Text.t -> bool
val starts_with : Text.t -> Text.t -> bool
val ends_with : Text.t -> Text.t -> bool
val strip : ?chars:Text.t list -> Text.t -> Text.t
val rstrip : ?chars:Text.t list -> Text.t -> Text.t
val lstrip : ?chars:Text.t list -> Text.t -> Text.t
val rchop : Text.t -> Text.t
val lchop : Text.t -> Text.t
type pointer
val pointer_l : Text.t -> Text.pointer
val pointer_r : Text.t -> Text.pointer
val pointer_at : Text.t -> int -> Text.pointer
val next : Text.pointer -> (Text.t * Text.pointer) option
val prev : Text.pointer -> (Text.t * Text.pointer) option
val move : int -> Text.pointer -> Text.pointer
val chunk : Text.pointer -> Text.pointer -> Text.t
val offset : Text.pointer -> int
val position : Text.pointer -> int
val equal_at : Text.pointer -> Text.t -> bool
val find : ?from:Text.pointer -> Text.t -> Text.t -> Text.pointer option
val rev_find :
?from:Text.pointer -> Text.t -> Text.t -> Text.pointer option
end