.TH "Char" 3o source: 2019-01-25 OCamldoc "OCaml library" .SH NAME Char \- Character operations. .SH Module Module Char .SH Documentation .sp Module .BI "Char" : .B sig end .sp Character operations\&. .sp .sp .sp .I val code : .B char -> int .sp Return the ASCII code of the argument\&. .sp .I val chr : .B int -> char .sp Return the character with the given ASCII code\&. Raise .B Invalid_argument "Char\&.chr" if the argument is outside the range 0\-\-255\&. .sp .I val escaped : .B char -> string .sp Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml\&. All characters outside the ASCII printable range (32\&.\&.126) are escaped, as well as backslash, double\-quote, and single\-quote\&. .sp .I val lowercase : .B char -> char .sp .B "Deprecated." Functions operating on Latin\-1 character set are deprecated\&. .sp Convert the given character to its equivalent lowercase character, using the ISO Latin\-1 (8859\-1) character set\&. .sp .I val uppercase : .B char -> char .sp .B "Deprecated." Functions operating on Latin\-1 character set are deprecated\&. .sp Convert the given character to its equivalent uppercase character, using the ISO Latin\-1 (8859\-1) character set\&. .sp .I val lowercase_ascii : .B char -> char .sp Convert the given character to its equivalent lowercase character, using the US\-ASCII character set\&. .sp .B "Since" 4.03.0 .sp .I val uppercase_ascii : .B char -> char .sp Convert the given character to its equivalent uppercase character, using the US\-ASCII character set\&. .sp .B "Since" 4.03.0 .sp .I type t = .B char .sp An alias for the type of characters\&. .sp .I val compare : .B t -> t -> int .sp The comparison function for characters, with the same specification as .B Pervasives\&.compare \&. Along with the type .B t , this function .B compare allows the module .B Char to be passed as argument to the functors .B Set\&.Make and .B Map\&.Make \&. .sp .I val equal : .B t -> t -> bool .sp The equal function for chars\&. .sp .B "Since" 4.03.0 .sp