IdrisDoc: Prelude.Chars

Prelude.Chars

Functions operating over Chars.

The representation of a Char is backend dependent,
for the C backend, it is a Unicode code point.

chr : Int -> Char

Convert the number to its backend dependent (usually Unicode) Char equivelent.

isAlpha : Char -> Bool

Returns true if the character is in the ranges [A-Z][a-z].

isAlphaNum : Char -> Bool

Returns true if the character is in the ranges [A-Z][a-z][0-9]

isControl : Char -> Bool

Returns true if the character is a control character.

isDigit : Char -> Bool

Returns true if the character is in the range [0-9]

isHexDigit : Char -> Bool

Returns true if the character is a hexadecimal digit i.e. in the range [0-9][a-f][A-F]

isLower : Char -> Bool

Returns true if the character is in the range [a-z]

isNL : Char -> Bool

Returns true if the character represents a new line.

isOctDigit : Char -> Bool

Returns true if the character is an octal digit.

isSpace : Char -> Bool

Returns true if the character is a whitespace character.

isUpper : Char -> Bool

Returns true if the character is in the range [A-Z].

ord : Char -> Int

Return the backend dependent (usually Unicode) numerical equivelent of the Char.

toLower : Char -> Char

Convert a letter to the corresponding lower-case letter, if any.
Non-letters are ignored.

toUpper : Char -> Char

Convert a letter to the corresponding upper-case letter, if any.
Non-letters are ignored.