From 792f8f12835287d2bc098eff5be109f609ef406b Mon Sep 17 00:00:00 2001 From: starnakin Date: Sat, 7 Sep 2024 01:56:52 +0200 Subject: [PATCH] add: isprint --- headers/ctype.h | 2 ++ src/ctype/isprint.c | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 src/ctype/isprint.c diff --git a/headers/ctype.h b/headers/ctype.h index a76d3f1..059726f 100644 --- a/headers/ctype.h +++ b/headers/ctype.h @@ -9,7 +9,9 @@ int isdigit(int c); /* int isgraph(int c); int islower(int c); +*/ int isprint(int c); +/* int ispunct(int c); int isspace(int c); int isupper(int c); diff --git a/src/ctype/isprint.c b/src/ctype/isprint.c new file mode 100644 index 0000000..13781b1 --- /dev/null +++ b/src/ctype/isprint.c @@ -0,0 +1,4 @@ +int isprint(int c) +{ + return (32 <= c && c < 127); +} \ No newline at end of file