Data.Char
ASCII character classification.
Operates on the byte/codepoint returned by byte_at/char_at. The prelude opens this module.
Functions and Values
is_digit
is_digit : (Int) -> Bool
True for an ASCII decimal digit (0-9).
is_upper
is_upper : (Int) -> Bool
True for an ASCII upper-case letter (A-Z).
is_lower
is_lower : (Int) -> Bool
True for an ASCII lower-case letter (a-z).
is_alpha
is_alpha : (Int) -> Bool
True for an ASCII letter.
is_alnum
is_alnum : (Int) -> Bool
True for an ASCII letter or digit.
is_space
is_space : (Int) -> Bool
True for ASCII whitespace (space, tab, newline, or carriage return).
to_lower_c
to_lower_c : (Int) -> Int
Lower-case an ASCII letter; any other codepoint is returned unchanged.
to_upper_c
to_upper_c : (Int) -> Int
Upper-case an ASCII letter; any other codepoint is returned unchanged.