1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#[inline]
pub fn alpha(term: u8) -> bool {
(term >= 0x41 && term <= 0x5A) || (term >= 0x61 && term <= 0x7A)
}
#[inline]
pub fn digit(term: u8) -> bool {
term >= 0x30 && term <= 0x39
}
#[inline]
pub fn alphanum(term: u8) -> bool {
alpha(term) || digit(term)
}
#[inline]
pub fn hex_digit(term: u8) -> bool {
(term >= 0x30 && term <= 0x39)
|| (term >= 0x41 && term <= 0x46)
|| (term >= 0x61 && term <= 0x66)
}
#[inline]
pub fn oct_digit(term: u8) -> bool {
term >= 0x30 && term <= 0x37
}
#[inline]
pub fn space(term: u8) -> bool {
term == b' ' || term == b'\t'
}
#[inline]
pub fn multispace(term: u8) -> bool {
space(term) || term == b'\n' || term == b'\r'
}