module BatChar:sig..end
Operations on characters.
Characters range upon Latin-1 encoding, i.e. languages used in
Western Europe and North America. For international characters,
another, richer, module is provided: UChar.
val code : char -> intReturn the ASCII code of the argument.
val chr : int -> charReturn the character with the given ASCII code.
Invalid_argument if the argument is
outside the range 0--255.val escaped : char -> stringReturn a string representing the given character, with special characters escaped following the lexical conventions of OCaml.
val lowercase : char -> charConvert the given character to its equivalent lowercase character.
val uppercase : char -> charConvert the given character to its equivalent uppercase character.
val lowercase_ascii : char -> charConvert the given character to its equivalent lowercase character, using the US-ASCII character set.
val uppercase_ascii : char -> charConvert the given character to its equivalent uppercase character, using the US-ASCII character set.
typet =char
An alias for the type of characters.
val is_whitespace : char -> boolDetermine if a character is a whitespace.
Whitespace characters are defined as
' ', '\010', '\013', '\009', '\026'
and '\012'.
val is_uppercase : char -> boolDetermine if a character is uppercase ASCII.
A character is uppercase ASCII if it is between
'A' and 'Z'
val is_lowercase : char -> boolDetermine if a character is lowercase ASCII.
A character is lowercase ASCII if it is between
'a' and 'z'
val is_uppercase_latin1 : char -> boolDetermine if a character is uppercase Latin 1.
A character is uppercase Latin 1 if it is between
'A' and 'Z', between 'À' and 'Ö' or
between 'Ø' and 'Ý'
val is_lowercase_latin1 : char -> boolDetermine if a character is lowercase Latin 1.
A character is lowercase Latin 1 if it is between
'a' and 'z', between 'Þ' and 'ö' or
between 'ø' and 'ÿ'
val is_latin1 : char -> boolDetermine if a character is a Latin 1 letter. A character is a Latin 1 letter if it is either an uppercase or a lowercase Latin 1 character.
val is_digit : char -> boolDetermine if a character represents a digit. Digits are '0',
'1', ... '9'.
val is_symbol : char -> boolDetermine if a character represents a (OCaml-style)
symbol. Symbols are '!', '%', '&', '$', '#', '+',
'-', '/', ':', '<', '=' '>', '?', '@', '\\',
'~', '^', '|', '*'
val is_letter : char -> boolDetermine if a character represents a ASCII letter.
val is_newline : char -> boolDetermine if a character is a newline. Newline characters are
defined as '\010' and '\013'
val of_digit : int -> charReturn the character representing a given digit.
Invalid_argument if the
argument is outside the range 0--9val enum : unit -> char BatEnum.tProduce the enumeration of all characters
val range : ?until:char -> char -> char BatEnum.trange from ?until produces an enumeration of the
characters from from to until included
until defaults to '\255'
val (--) : char -> char -> char BatEnum.tProduce the enumeration of a segment of characters.
'a' -- 'z' is the enumeration of all characters
between 'a' and 'z' included.
module Infix:sig..end
Infix submodule regrouping all infix operators
val print : 'a BatInnerIO.output -> Stdlib.Char.t -> unit
val compare : t -> t -> intThe comparison function for characters, with the same specification as
Pervasives.compare. Along with the type t, this function compare
allows the module Char to be passed as argument to the functors
Set.Make and Map.Make.
val equal : t -> t -> bool
val hash : t -> int
val ord : char BatOrd.ord
module Incubator:sig..end