1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-16 07:02:25 +00:00
serenity/LibC/ctype.cpp

13 lines
293 B
C++

#include <ctype.h>
#include <string.h>
int ispunct(int c)
{
const char* punctuation_characters = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
return !!strchr(punctuation_characters, c);
}
int isprint(int c)
{
return isdigit(c) || isupper(c) || islower(c) || ispunct(c) || isspace(c);
}