projects
/
onyx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00d126b
)
added: `u8.is_whitespace`
author
Brendan Hansen
<brendan.f.hansen@gmail.com>
Tue, 7 Mar 2023 21:37:04 +0000
(15:37 -0600)
committer
Brendan Hansen
<brendan.f.hansen@gmail.com>
Tue, 7 Mar 2023 21:37:04 +0000
(15:37 -0600)
core/string/char_utils.onyx
patch
|
blob
|
history
diff --git
a/core/string/char_utils.onyx
b/core/string/char_utils.onyx
index 86756ebab6e21f8c79f3e7840c6cba526e58fa12..800913f374b2deed3cb53b1b398f209c96a6df54 100644
(file)
--- a/
core/string/char_utils.onyx
+++ b/
core/string/char_utils.onyx
@@
-21,6
+21,10
@@
package core.string
is_alphanum :: (c: u8) -> bool {
return c->is_alpha() || c->is_num();
}
+
+ is_whitespace :: (c: u8) -> bool {
+ return c == #char " " || c == #char "\n" || c == #char "\t" || c == #char "\v";
+ }
}