4 static inline int islower (int c) { return c >= 'a' && c <= 'z'; }
5 static inline int isupper (int c) { return c >= 'A' && c <= 'Z'; }
6 static inline int isalpha (int c) { return islower (c) || isupper (c); }
7 static inline int isdigit (int c) { return c >= '0' && c <= '9'; }
8 static inline int isalnum (int c) { return isalpha (c) || isdigit (c); }
9 static inline int isxdigit (int c) {
10 return isdigit (c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
12 static inline int isspace (int c) {
13 return (c == ' ' || c == '\f' || c == '\n'
14 || c == '\r' || c == '\t' || c == '\v');
16 static inline int isblank (int c) { return c == ' ' || c == '\t'; }
17 static inline int isgraph (int c) { return c >= 33 && c < 127; }
18 static inline int isprint (int c) { return c >= 32 && c < 127; }
19 static inline int iscntrl (int c) { return c >= 0 && c < 32; }
20 static inline int isascii (int c) { return c >= 0 && c < 128; }
21 static inline int ispunct (int c) {
22 return isprint (c) && !isalnum (c) && !isspace (c);
25 static inline int tolower (int c) { return isupper (c) ? c - 'A' + 'a' : c; }
26 static inline int toupper (int c) { return islower (c) ? c - 'a' + 'A' : c; }
28 #endif /* lib/ctype.h */