std/char
ASCII character classification.
fn(char) -> bool classification predicates, split out of std/string so the
codepoint-string API (std/string) and char classification (here) have
distinct homes. Import-required, not part of the std/core prelude. Numeric-
base predicates (is_hex_digit, is_digit_in_base) stay in std/numbers.
Functions
is_white_char :: fn(c: char) -> bool True for ASCII whitespace: space, tab, newline, carriage return.
Parameters
| c | char | the codepoint to test. |
Returns
bool is_digit :: fn(c: char) -> bool True for an ASCII decimal digit '0'–'9'.
Parameters
| c | char | the codepoint to test. |
Returns
bool is_alpha :: fn(c: char) -> bool True for an ASCII letter 'a'–'z' or 'A'–'Z'.
Parameters
| c | char | the codepoint to test. |
Returns
bool is_alnum :: fn(c: char) -> bool True for an ASCII letter or digit (is_alpha or is_digit).
Parameters
| c | char | the codepoint to test. |
Returns
bool