summaryrefslogtreecommitdiff
path: root/kernel/libc/ctype
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-12-10 12:24:07 +0100
committerAnton Kling <anton@kling.gg>2024-12-10 12:24:07 +0100
commit916aa42260290e9e864304bc7d9395b6aa693c27 (patch)
tree784cdcbe26e828e18413bf9d31d6a84ed74dd1ba /kernel/libc/ctype
parentbcca3d183930eeaf3d024476f39d1d8fccf2ebab (diff)
kernel: Add string view and string builder
This makes write/read calls that use strings to communicate much simpler and less error prone.
Diffstat (limited to 'kernel/libc/ctype')
-rw-r--r--kernel/libc/ctype/isspace.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/libc/ctype/isspace.c b/kernel/libc/ctype/isspace.c
new file mode 100644
index 0000000..a922d91
--- /dev/null
+++ b/kernel/libc/ctype/isspace.c
@@ -0,0 +1,5 @@
+#include <ctype.h>
+
+int isspace(int c) {
+ return c == ' ' || (unsigned)c - '\t' < 5;
+}