Unicode String, in UTF8
A unicode string represented by a utf8 bytestring. This representation is convenient for manipulating normal OCaml strings that are encoded in UTF8.
We perform only basic decoding and encoding between codepoints and bytestrings. For more elaborate operations, please use the excellent Uutf.
status: experimental
Sourcetype 'a gen = unit -> 'a option Sourcetype 'a sequence = ('a -> unit) -> unit Sourcetype 'a iter = ('a -> unit) -> unit Malformed string at given offset
Generator of unicode codepoints.
Iterator of unicode codepoints.
Iter of unicode codepoints.
List of unicode codepoints.
Sourceval fold : ?idx:int -> ('a -> uchar -> 'a) -> 'a -> t -> 'a Build a string from unicode codepoints
Build a string from unicode codepoints
Sourceval of_string_exn : string -> t Validate string by checking it is valid UTF8.
Sourceval of_string : string -> t option Sourceval is_valid : string -> bool Sourceval unsafe_of_string : string -> t Conversion from a string without validating. CAUTION this is unsafe and can break all the other functions in this module. Use only if you're sure the string is valid UTF8. Upon iteration, if an invalid substring is met, Malformed will be raised.