diff options
author | Anton Kling <anton@kling.gg> | 2024-12-10 12:24:07 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-12-10 12:24:07 +0100 |
commit | 916aa42260290e9e864304bc7d9395b6aa693c27 (patch) | |
tree | 784cdcbe26e828e18413bf9d31d6a84ed74dd1ba /kernel/libc/ctype | |
parent | bcca3d183930eeaf3d024476f39d1d8fccf2ebab (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.c | 5 |
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; +} |