Uutf

`sig
type uchar = int
val u_bom : Uutf.uchar
val u_rep : Uutf.uchar
val is_uchar : int -> bool
val cp_to_string : int -> string
val pp_cp : Format.formatter -> int -> unit
type encoding = [ `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ]
type decoder_encoding =
[ `ISO_8859_1 | `US_ASCII | `UTF_16 | `UTF_16BE | `UTF_16LE | `UTF_8 ]
val encoding_of_string : string -> Uutf.decoder_encoding option
val encoding_to_string : [< Uutf.decoder_encoding ] -> string
type src =
[ `Channel of Pervasives.in_channel | `Manual | `String of string ]
type nln =
[ `ASCII of Uutf.uchar | `NLF of Uutf.uchar | `Readline of Uutf.uchar ]
type decoder
val decoder :
?nln:[< Uutf.nln ] ->
?encoding:[< Uutf.decoder_encoding ] -> [< Uutf.src ] -> Uutf.decoder
val decode :
Uutf.decoder ->
[ `Await | `End | `Malformed of string | `Uchar of Uutf.uchar ]
val decoder_encoding : Uutf.decoder -> Uutf.decoder_encoding
val set_decoder_encoding :
Uutf.decoder -> [< Uutf.decoder_encoding ] -> unit
val decoder_line : Uutf.decoder -> int
val decoder_col : Uutf.decoder -> int
val decoder_count : Uutf.decoder -> int
val decoder_removed_bom : Uutf.decoder -> bool
val decoder_src : Uutf.decoder -> Uutf.src
val decoder_nln : Uutf.decoder -> Uutf.nln option
val pp_decode :
Format.formatter ->
[< `Await | `End | `Malformed of string | `Uchar of Uutf.uchar ] -> unit
type dst =
[ `Buffer of Buffer.t | `Channel of Pervasives.out_channel | `Manual ]
type encoder
val encoder : [< Uutf.encoding ] -> [< Uutf.dst ] -> Uutf.encoder
val encode :
Uutf.encoder ->
[< `Await | `End | `Uchar of Uutf.uchar ] -> [ `Ok | `Partial ]
val encoder_encoding : Uutf.encoder -> Uutf.encoding
val encoder_dst : Uutf.encoder -> Uutf.dst
module Manual :
sig
val src : Uutf.decoder -> string -> int -> int -> unit
val dst : Uutf.encoder -> string -> int -> int -> unit
val dst_rem : Uutf.encoder -> int
end
module String :
sig
val encoding_guess :
string -> [ `UTF_16BE | `UTF_16LE | `UTF_8 ] * bool
type 'a folder =
'a -> int -> [ `Malformed of string | `Uchar of Uutf.uchar ] -> 'a
val fold_utf_8 : 'a Uutf.String.folder -> 'a -> string -> 'a
val fold_utf_16be : 'a Uutf.String.folder -> 'a -> string -> 'a
val fold_utf_16le : 'a Uutf.String.folder -> 'a -> string -> 'a
end
module Buffer :
sig
val add_utf_8 : Buffer.t -> Uutf.uchar -> unit
val add_utf_16be : Buffer.t -> Uutf.uchar -> unit
val add_utf_16le : Buffer.t -> Uutf.uchar -> unit
end
end`