From 916aa42260290e9e864304bc7d9395b6aa693c27 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Tue, 10 Dec 2024 12:24:07 +0100 Subject: kernel: Add string view and string builder This makes write/read calls that use strings to communicate much simpler and less error prone. --- kernel/libc/ctype/isspace.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 kernel/libc/ctype/isspace.c (limited to 'kernel/libc/ctype') 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 + +int isspace(int c) { + return c == ' ' || (unsigned)c - '\t' < 5; +} -- cgit v1.2.3