From 154bf6f53529e88dfa03d6ff5034b575f92cdbb5 Mon Sep 17 00:00:00 2001 From: nasr Date: Tue, 14 Apr 2026 23:11:49 +0200 Subject: feature(setup): base implementation --- source/base/base_string.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'source/base/base_string.c') diff --git a/source/base/base_string.c b/source/base/base_string.c index e69de29..986fde5 100644 --- a/source/base/base_string.c +++ b/source/base/base_string.c @@ -0,0 +1,30 @@ +internal b32 +is_alpha(u8 point) +{ + return ((point >= 'a' && point <= 'z') || (point >= 'A' && point <= 'Z') || (point == '_')); +} + +internal b32 +is_digit(u8 point) +{ + return (point >= '0' && point <= '9'); +} + +internal b32 +is_alpha_num(u8 point) +{ + return (is_alpha(point) || is_digit(point)); +} + +internal b32 is_whitespace(u8 point) +{ + return (point == '\n' || point == '\r' || point == ' ' || point == '\t'); +} + +internal b32 +is_slash(u8 point) +{ + return (point == '/' || point == '\\'); +} + + -- cgit v1.3