module UChar: Extlib.ExtUChar.UCharUnicode (ISO-UCS) characters.
This module implements Unicode (actually ISO-UCS) characters. All 31-bit code points are allowed.
Note For conversions to lower/upercase, see modules UTF8 and Rope.
Author(s): Yamagata Yoriyuki (Camomile module), Edgar Friendly, David Teller
typet =CamomileLibrary.UChar.t
val is_whitespace : t -> bool
A character is a whitespace if it is either one of the ASCII
whitespaces (characters 9, 10, 12, 13, 26 and 32), or a part of
Unicode category Z (separators).
val is_uppercase : t -> boolval is_lowercase : t -> boolval is_newline : t -> bool`Zlval lowercase : t -> tval uppercase : t -> texception Out_of_range
val of_char : char -> tof_char c returns the Unicode character of the Latin-1 character cval to_char : t -> charto_char u returns the Latin-1 representation of u.Out_of_range if u can not be represented by Latin-1.val code : t -> intcode u returns the Unicode code number of u.
If the value can not be represented by a positive integer,
raise Out_of_rangeval chr : int -> tcode n returns the Unicode character with the code number n.
If n >= 2^31 or n < 0, raises invalid_argval uint_code : t -> intuint_code u returns the Unicode code number of u.
The returned int is unsigned, that is, on 32-bits platforms,
the sign bit is used for storing the 31-th bit of the code number.val chr_of_uint : int -> tchr_of_uint n returns the Unicode character of the code number n.
n is interpreted as unsigned, that is, on 32-bits platforms,
the sign bit is treated as the 31-th bit of the code number.
If n exceed 31-bits values, then raise invalid_arg.val of_digit : int -> tInvalid_argument "UChar.of_digit" if the
argument is outside the range 0--9val to_int : t -> intuint_codeval of_int : int -> tchr_of_uintval eq : t -> t -> bool
val compare : t -> t -> intcompare u1 u2 returns,
a value > 0 if u1 has a larger Unicode code number than u2,
0 if u1 and u2 are the same Unicode character,
a value < 0 if u1 has a smaller Unicode code number than u2.val icompare : t -> t -> intmodule UChar.IUChar:Extlib.Interfaces.OrderedTypewith type t = t
typeuchar =t
t