Module UCharImpl

module UCharImpl: sig .. end
Implementation of Unicode characters based on the Camomile library (available at http://camomile.sourceforge.net).

One is advised to use the Utils.UChar module instead of this one.


type t 
The type of Unicode characters.
type error = 
| Unrepresentable_character of t
| Invalid_character_code of int
exception Exception of error
val string_of_error : error -> string
val of_char : char -> t
Conversion from standard character into Unicode character.
val to_char : t -> char
Conversion from Unicode character into standard character. Raises Exception if conversion fails.
val to_char_noerr : t -> char
Equivalent to to_char, except that any exception is discarded and '?' is returned.
val of_code : int -> t
Conversion from Unicode code value into Unicode character. Raises Exception if conversion fails.
val to_code : t -> int
Conversion from Unicode character into Unicode code value. Raises Exception if conversion fails.
val equal : t -> t -> bool
Equality over Unicode characters.
val compare : t -> t -> int
Comparison over Unicode characters.
val hash : t -> int
Hash function over Unicode characters.
val is_letter : t -> bool
Predicate testing whether the passed character is a letter.
val is_digit : t -> bool
Predicate testing whether the passed character is a digit.
val is_letter_or_digit : t -> bool
Predicate testing whether the passed character is a letter, a digit, or an underscore.
val is_space : t -> bool
Predicate testing whether the passed character is a whitespace.