Even more work

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2025-02-12 00:03:19 +01:00
parent b61005bcaa
commit 15b8ed7690
9 changed files with 250 additions and 55 deletions
+10 -2
View File
@@ -6,7 +6,7 @@
bool blitz::utility::is_symbol(int code)
{
switch (chr) {
switch (code) {
case ';': // Comment
case ':': // Command Separator
case '=': // Equal
@@ -39,7 +39,7 @@ bool blitz::utility::is_symbol(int code)
bool blitz::utility::is_white_space(int code)
{
switch (chr) {
switch (code) {
case ' ':
case '\t':
return true;
@@ -57,3 +57,11 @@ bool blitz::utility::is_digit(int code)
bool blitz::utility::is_alpha(int code) {
return isalpha(code);
}
char blitz::utility::utf8_safe_tolower(char code)
{
if (code & 0b10000000) { // Exclude Unicode
return code;
}
return (char)std::tolower(code);
}