From 5ef223372bd454943e14373139391673a1f99b11 Mon Sep 17 00:00:00 2001 From: Timerix Date: Sat, 15 Nov 2025 11:51:21 +0500 Subject: [PATCH] renamed char_* functions --- include/tlibc/string/char.h | 6 +++--- src/string/str.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/tlibc/string/char.h b/include/tlibc/string/char.h index f889909..84e7ed1 100755 --- a/include/tlibc/string/char.h +++ b/include/tlibc/string/char.h @@ -1,6 +1,6 @@ #pragma once #include "../std.h" -static inline bool isAlphabeticalLower(char c) { return 'a' <= c && c <= 'z'; } -static inline bool isAlphabeticalUpper(char c) { return 'A' <= c && c <= 'Z'; } -static inline bool isDigit(char c) { return '0' <= c && c <= '9'; } \ No newline at end of file +static inline bool char_isLatinLower(char c) { return 'a' <= c && c <= 'z'; } +static inline bool char_isLatinUpper(char c) { return 'A' <= c && c <= 'Z'; } +static inline bool char_isDigit(char c) { return '0' <= c && c <= '9'; } \ No newline at end of file diff --git a/src/string/str.c b/src/string/str.c index b0bee62..e88aed0 100755 --- a/src/string/str.c +++ b/src/string/str.c @@ -117,7 +117,7 @@ u32 str_hash32(const str s){ str str_toUpper(const str src){ str r = str_copy(src); for (u32 i = 0; i < r.size; i++){ - if(isAlphabeticalLower(r.data[i])) + if(char_isLatinLower(r.data[i])) r.data[i] = r.data[i] - 'a' + 'A'; } return r; @@ -126,7 +126,7 @@ str str_toUpper(const str src){ str str_toLower(const str src){ str r = str_copy(src); for (u32 i = 0; i < r.size; i++){ - if(isAlphabeticalUpper(r.data[i])) + if(char_isLatinUpper(r.data[i])) r.data[i] = r.data[i] - 'A' + 'a'; } return r;