Add isprint and isgraph

This commit is contained in:
g1n 2021-12-29 21:29:51 +02:00
parent 1a121ef213
commit c2ba116026
2 changed files with 10 additions and 0 deletions

View File

@ -35,3 +35,11 @@ int isalnum(int c) {
int iscntrl(int c) {
return (unsigned)c < 0x20 || c == 0x7f;
}
int isprint(int c) {
return (unsigned)c-0x20 < 0x5f;
}
int isgraph(int c) {
return (unsigned)c-0x21 < 0x5e;
}

View File

@ -10,5 +10,7 @@ int isupper(int c);
int isalpha(int c);
int isalnum(int c);
int iscntrl(int c);
int isprint(int c);
int isgraph(int c);
#endif