G2Labs Grzegorz Grzęda
libc - ctype.h functions
June 17, 2023
Here I gathered the return values of ctype.h
functions:
- ✅ - return value
!= 0
(true
) - ❌ - return value
== 0
(false
)
Every function has the same signature: int isXXX(char c)
:
ASCIIvalues | characters | iscntrl | isprint | isspace | isblank | isgraph | ispunct | isalnum | isalpha | isupper | islower | isdigit | isxdigit |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x000x08 | NULL, etc. | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x09 | '\t' | ✅ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x0A0x0D | '\n' , '\r' , '\v' ,etc. | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x0E0x1F | control codes | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x20 | space | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x210x2F | !"#$%&'()*+,-./ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x300x39 | 0123456789 | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ | ✅ | ✅ |
0x3A0x40 | :;<=>?@ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x410x46 | ABCDEF | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
0x470x5A | GHIJKLMNOPQRSTUVWXYZ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
0x5B0x60 | []^_` | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x610x66 | abcdef | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ✅ |
0x670x7A | ghijklmnopqrstuvwxyz | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | ✅ | ❌ | ✅ | ❌ | ❌ |
0x7B0x7E | {|}~ | ❌ | ✅ | ❌ | ❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
0x7f | DEL | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |