summaryrefslogtreecommitdiff
path: root/source/base/base_string.c
diff options
context:
space:
mode:
authornasr <nsrddyn@gmail.com>2026-04-17 17:49:10 +0200
committernasr <nsrddyn@gmail.com>2026-04-17 17:50:28 +0200
commit078e21a1feb811f9ef7797ce3ee5d2e8ffcccfce (patch)
treec1121bed141fb536be6b21a6fc54ccd2b5ac7302 /source/base/base_string.c
parent9d09d66a273f68fae7efb71504bf40c664b91983 (diff)
feature(main): during my work on other projects I improved the base library a bit.
this is a drag and drop of that in the project. the next steps exit out of implementing lineair regression and attempting to calcualte what the value would be of a key in the btree... Signed-off-by: nasr <nsrddyn@gmail.com> feature(main): during my work on other projects I improved the base library a bit. this is a drag and drop of that in the project. the next steps exit out of implementing lineair regression and attempting to calcualte what the value would be of a key in the btree... Signed-off-by: nasr <nsrddyn@gmail.com>
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