type tThe type for Unicode characters.
A value of this type represents a Unicode scalar value which is an integer in the ranges
0x0000...0xD7FFor0xE000...0x10FFFF.
val min : tminis U+0000.
val max : tmaxis U+10FFFF.
val bom : tbomis U+FEFF, the byte order mark (BOM) character.- since
- 4.06.0
val rep : trepis U+FFFD, the replacement character.- since
- 4.06.0
val succ : t -> tsucc uis the scalar value afteruin the set of Unicode scalar values.- raises Invalid_argument
if
uismax.
val pred : t -> tpred uis the scalar value beforeuin the set of Unicode scalar values.- raises Invalid_argument
if
uismin.
val is_valid : int -> boolis_valid nistrueiffnis a Unicode scalar value (i.e. in the ranges0x0000...0xD7FFor0xE000...0x10FFFF).
val of_int : int -> tof_int iisias a Unicode character.- raises Invalid_argument
if
idoes not satisfyis_valid.
val to_int : t -> intto_int uisuas an integer.
val is_char : t -> boolis_char uistrueiffuis a latin1 OCaml character.
val of_char : char -> tof_char ciscas a Unicode character.
val to_char : t -> charto_char uisuas an OCaml latin1 character.- raises Invalid_argument
if
udoes not satisfyis_char.
val hash : t -> inthash uassociates a non-negative integer tou.