1pub fn is_alnum(c: u8) -> bool {
2 is_alpha(c) || is_digit(c)
3}
4pub fn is_alpha(c: u8) -> bool {
5 is_lower(c) || is_upper(c)
6}
7pub fn is_blank(c: u8) -> bool {
8 c == b' ' || c == b'\t'
9}
10pub fn is_cntrl(c: u8) -> bool {
11 c <= 0x1f || c == 0x7f
12}
13pub fn is_digit(c: u8) -> bool {
14 c >= b'0' && c <= b'9'
15}
16pub fn is_graph(c: u8) -> bool {
17 c >= 0x21 && c <= 0x7e
18}
19pub fn is_lower(c: u8) -> bool {
20 c >= b'a' && c <= b'z'
21}
22pub fn is_print(c: u8) -> bool {
23 c >= 0x20 && c <= 0x7e
24}
25pub fn is_punct(c: u8) -> bool {
26 is_graph(c) && !is_alnum(c)
27}
28pub fn is_space(c: u8) -> bool {
29 c == b' ' || (c >= 0x9 && c <= 0xD)
30}
31pub fn is_upper(c: u8) -> bool {
32 c >= b'A' && c <= b'Z'
33}
34pub fn is_xdigit(c: u8) -> bool {
35 is_digit(c) || (c >= b'a' && c <= b'f') || (c >= b'A' && c <= b'F')
36}
37
38pub fn is_word_boundary(c: u8) -> bool {
39 !is_alnum(c) && c != b'_'
40}