Module Cduce_types__CharSet.V
A module for manipulating atom Values.
val mk_int : int -> tmk_int icreates a character from it Unicode code point.- raises [Failure]
if
iis not a valid code point.
val mk_char : char -> tmk_char ccreates a character from an OCamlchar, that is a code point in the range [0-255].
val to_int : t -> intto_int treturns the integer corresponding to the code point.
val to_char : t -> charto_char treturns thecharcorresponding to the code point.- raises [Failure]
if
tis not in the range [0-255].
val print : Stdlib.Format.formatter -> t -> unitprint_in_string fmt tprints the code point correctly escaped, between a pair of single quotes. Code points 9 (horizontal tab), 10 (new line), 13 (carriage return), 34 (double quote) 39 (single quote) are printed as'\t','\n','\r','\"'and'\''repsectively.Code points below 32 (non printable characters) or above 127 (non ascii characters) are printed as their ℂDuce escape sequence \ddddd.
val print_in_string : Stdlib.Format.formatter -> t -> unitprint_in_string fmt tprints the code point asprintbut without the surrounding single quotes.