Unicode characters.
type t
The type for Unicode characters.
A value of this type represents an Unicode
scalar
value which is an integer in the ranges 0x0000
...0xD7FF
or
0xE000
...0x10FFFF
.
succ u
is the scalar value after u
in the set of Unicode scalar
values.
u
is max.pred u
is the scalar value before u
in the set of Unicode scalar
values.
u
is min.val is_valid : int -> bool
is_valid n
is true
iff n
is an Unicode scalar value
(i.e. in the ranges 0x0000
...0xD7FF
or 0xE000
...0x10FFFF
).
val of_int : int -> t
of_int i
is i
as an Unicode character.
i
does not satisfy is_valid.val unsafe_of_int : int -> t
val to_char : t -> char
to_char u
is u
as an OCaml latin1 character.
u
does not satisfy is_char.val unsafe_to_char : t -> char