mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:18:12 +00:00
Add ispunct() to LibC + some minor cleanups.
This commit is contained in:
parent
3b2f172d48
commit
7cc4caee4f
5 changed files with 16 additions and 2 deletions
8
LibC/ctype.cpp
Normal file
8
LibC/ctype.cpp
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
int ispunct(int c)
|
||||
{
|
||||
const char* punctuation_characters = "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
|
||||
return !!strchr(punctuation_characters, c);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue