summaryrefslogtreecommitdiff
path: root/libk/src/ctype.c
diff options
context:
space:
mode:
authorTyler Murphy <=>2023-07-16 02:54:32 -0400
committerTyler Murphy <=>2023-07-16 02:54:32 -0400
commitfbf131b5c043b27e0b1543374bb144e3e426f723 (patch)
tree07f0ab2fc107b36621d5ae95480e6a91e332548b /libk/src/ctype.c
downloadfinix-fbf131b5c043b27e0b1543374bb144e3e426f723.tar.gz
finix-fbf131b5c043b27e0b1543374bb144e3e426f723.tar.bz2
finix-fbf131b5c043b27e0b1543374bb144e3e426f723.zip
initial
Diffstat (limited to 'libk/src/ctype.c')
-rw-r--r--libk/src/ctype.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libk/src/ctype.c b/libk/src/ctype.c
new file mode 100644
index 0000000..2e8714f
--- /dev/null
+++ b/libk/src/ctype.c
@@ -0,0 +1,19 @@
+#include <ctype.h>
+
+int isspace(int c) {
+ switch (c) {
+ case ' ':
+ case '\t':
+ case '\v':
+ case '\f':
+ case '\r':
+ case '\n':
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+int isdigit(int c) {
+ return c - '0' > -1 && c - '0' < 10;
+}