summaryrefslogtreecommitdiff
path: root/source/base/base_string.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/base/base_string.c')
-rw-r--r--source/base/base_string.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/base/base_string.c b/source/base/base_string.c
new file mode 100644
index 0000000..986fde5
--- /dev/null
+++ b/source/base/base_string.c
@@ -0,0 +1,30 @@
1internal b32
2is_alpha(u8 point)
3{
4 return ((point >= 'a' && point <= 'z') || (point >= 'A' && point <= 'Z') || (point == '_'));
5}
6
7internal b32
8is_digit(u8 point)
9{
10 return (point >= '0' && point <= '9');
11}
12
13internal b32
14is_alpha_num(u8 point)
15{
16 return (is_alpha(point) || is_digit(point));
17}
18
19internal b32 is_whitespace(u8 point)
20{
21 return (point == '\n' || point == '\r' || point == ' ' || point == '\t');
22}
23
24internal b32
25is_slash(u8 point)
26{
27 return (point == '/' || point == '\\');
28}
29
30