summaryrefslogtreecommitdiff
path: root/kernel/libc
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-12-08 18:56:47 +0100
committerAnton Kling <anton@kling.gg>2024-12-08 18:56:47 +0100
commit46f101dcef6c4e4495f8d187e5c31bd10e0eb370 (patch)
treedb67964169b542c54bf761998180abaa4ca4f2a0 /kernel/libc
parent6b8910913e706ec1c3f0378c1ce52c95350bfd2c (diff)
kernel/libc: Add isdigit()
Diffstat (limited to 'kernel/libc')
-rw-r--r--kernel/libc/ctype/isdigit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/libc/ctype/isdigit.c b/kernel/libc/ctype/isdigit.c
new file mode 100644
index 0000000..0d4f076
--- /dev/null
+++ b/kernel/libc/ctype/isdigit.c
@@ -0,0 +1,5 @@
+#include <ctype.h>
+
+int isdigit(int c) {
+ return ('0' <= c && c <= '9');
+}