summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runtime/c/gu/utf8.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/runtime/c/gu/utf8.h b/src/runtime/c/gu/utf8.h
index 7674c6e02..3118c4071 100644
--- a/src/runtime/c/gu/utf8.h
+++ b/src/runtime/c/gu/utf8.h
@@ -37,4 +37,10 @@ gu_utf8_decode(const uint8_t** utf8);
void
gu_in_utf8_buf(uint8_t** buf, GuIn* in, GuExn* err);
+bool
+gu_is_space(uint8_t c) {
+ return (c == '\t' || c == '\n' || c == '\v' ||
+ c == '\f' || c == '\r' || c == ' ');
+}
+
#endif // GU_UTF8_H_