Char
Char module: character classification and conversion utilities.
Wraps the built-in char_* primitives for idiomatic use. All predicates return Bool; conversions preserve the char type.
Functions
Returns true if c is an ASCII letter (a-z or A-Z).
Returns true if c is an ASCII digit (0-9).
Returns true if c is an ASCII letter or digit.
Returns true if c is an ASCII uppercase letter (A-Z).
Returns true if c is an ASCII lowercase letter (a-z).
Returns true if c is an ASCII whitespace character (space, tab, newline, etc.).
Converts c to uppercase. Non-alphabetic chars are returned unchanged.
Converts c to lowercase. Non-alphabetic chars are returned unchanged.
Returns the integer code point of c.
Returns the character with the given code point.
Returns a single-character string containing c.
Returns true if c is ASCII (code point 0-127).
Returns true if c is a printable ASCII character (code point 32-126).
Returns the numeric value of a digit character (0-9). Panics if not a digit.
Returns the hex value of a hex digit (0-9, a-f, A-F). Panics if not hex.
Returns true if c is a hex digit (0-9, a-f, A-F).