1
Fork 0
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:
Andreas Kling 2018-11-11 00:44:04 +01:00
parent 3b2f172d48
commit 7cc4caee4f
5 changed files with 16 additions and 2 deletions

8
LibC/ctype.cpp Normal file
View file

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