Add isprint and isgraph
This commit is contained in:
parent
1a121ef213
commit
c2ba116026
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue