sig
type elt = Unicode.utf8_char
val sequence :
fail:([> `illegal_sequence ] -> int) -> Unicode.UTF8.elt -> int
val max_sequence : int
val is_trailing : Unicode.UTF8.elt -> bool
val decode3 :
('d -> 'e -> Unicode.UTF8.elt) ->
('d -> 'e -> 'e) ->
('d -> 'e -> bool) ->
('a -> 'b -> 'c -> 'd -> 'e -> 'e -> Stdlib.Uchar.t -> 'f) ->
fail:('a ->
'b -> 'c -> 'd -> 'e -> 'e -> [> Unicode.utf8_decode_error ] -> 'f) ->
'a -> 'b -> 'c -> 'd -> 'e -> 'f
val decode :
('a -> 'b -> Unicode.UTF8.elt) ->
('a -> 'b -> 'b) ->
('a -> 'b -> bool) ->
('a -> 'b -> 'b -> Stdlib.Uchar.t -> 'c) ->
fail:('a -> 'b -> 'b -> [> Unicode.utf8_decode_error ] -> 'c) ->
'a -> 'b -> 'c
val encode4 :
('e -> 'f -> Unicode.UTF8.elt -> 'f) ->
fail:('a -> 'b -> 'c -> 'd -> 'e -> 'f -> [> `unexist ] -> 'f) ->
'a -> 'b -> 'c -> 'd -> 'e -> 'f -> Stdlib.Uchar.t -> 'f
val encode :
('a -> 'b -> Unicode.UTF8.elt -> 'b) ->
fail:('a -> 'b -> [> `unexist ] -> 'b) ->
'a -> 'b -> Stdlib.Uchar.t -> 'b
type t = Unicode.utf8_string
val compare : Unicode.UTF8.t -> Unicode.UTF8.t -> int
val equal : Unicode.UTF8.t -> Unicode.UTF8.t -> bool
external length : Unicode.UTF8.t -> int = "%string_length"
external get : Unicode.UTF8.t -> int -> Unicode.UTF8.elt
= "%string_safe_get"
external unsafe_get : Unicode.UTF8.t -> int -> Unicode.UTF8.elt
= "%string_unsafe_get"
val empty : Unicode.UTF8.t
val cat : Unicode.UTF8.t -> Unicode.UTF8.t -> Unicode.UTF8.t
val sub : Unicode.UTF8.t -> int -> int -> Unicode.UTF8.t
val blit : Unicode.UTF8.t -> int -> bytes -> int -> int -> unit
external unsafe_blit : Unicode.UTF8.t -> int -> bytes -> int -> int -> unit
= "caml_blit_string" [@@noalloc]
val lead : Unicode.UTF8.t -> int -> int
val rear : Unicode.UTF8.t -> int -> int
val get_code :
fail:(Unicode.UTF8.t ->
int -> int -> [> Unicode.utf8_decode_error ] -> Stdlib.Uchar.t) ->
Unicode.UTF8.t -> int Stdlib.ref -> Stdlib.Uchar.t
val set_code :
fail:(bytes -> int -> [> `unexist ] -> Stdlib.Uchar.t) ->
bytes -> int Stdlib.ref -> Stdlib.Uchar.t -> unit
val of_utf16 :
fail:(Unicode.utf16_string ->
int ->
int -> [> `surrogate_fragment of int | `unexist ] -> Stdlib.Uchar.t) ->
Unicode.utf16_string -> Unicode.UTF8.t
val of_utf32 :
fail:(Unicode.utf32_string ->
int ->
int ->
[> `illegal_sequence
| `over_17planes of int
| `surrogate_fragment of int
| `unexist ] ->
Stdlib.Uchar.t) ->
Unicode.utf32_string -> Unicode.UTF8.t
val of_array : Unicode.UTF8.elt array -> Unicode.UTF8.t
end