blob: 7ced3a271a67bd003682d7c402479983d2e87426 (
plain)
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
|
/**
* Returns 1 if c is a "whitespace" character as defined by the spec.
*/
int cmark_isspace(char c)
{
return (c == 0x09 ||
c == 0x20 ||
c == 0x0a ||
c == 0x0d);
}
/**
* Returns 1 if c is an ascii punctuation character.
*/
int cmark_ispunct(char c)
{
return ((c >= 33 && c <= 47) ||
(c >= 58 && c <= 64) ||
(c >= 91 && c <= 96) ||
(c >= 123 && c <= 126));
}
int cmark_isalnum(char c)
{
return ((c >= 48 && c <= 57) ||
(c >= 65 && c <= 90) ||
(c >= 97 && c <= 122));
}
int cmark_isdigit(char c)
{
return (c >= 48 && c <= 57);
}
|