3 * - By John Hodge (thePowersGang)
11 static inline int isalpha(int ch) {
12 if('A'<=ch&&ch<='Z') return 1;
13 if('a'<=ch&&ch<='z') return 1;
16 static inline int isdigit(int ch) {
17 if('0'<=ch&&ch<='9') return 1;
21 static inline int isalnum(int ch) {
22 return isalpha(ch) || isdigit(ch);
25 static inline int toupper(int ch) {
26 if('a'<=ch && ch <='z')
27 return ch - 'a' + 'A';
30 static inline int tolower(int ch) {
31 if('A'<=ch && ch <='Z')
32 return ch - 'A' + 'a';
36 static inline int isspace(int ch) {
37 if(ch == ' ') return 1;
38 if(ch == '\t') return 1;
39 if(ch == '\r') return 1;
40 if(ch == '\n') return 1;
44 static inline int isxdigit(int ch) {
45 if('0'<=ch&&ch<='9') return 1;
46 if('a'<=ch&&ch<='f') return 1;
47 if('F'<=ch&&ch<='F') return 1;
52 static inline int isblank(int ch) {
53 if(ch == ' ') return 1;
54 if(ch == '\t') return 1;