mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 18:42:28 +00:00
chore(string): clean up SStrLen
This commit is contained in:
parent
3b8fe9bdf6
commit
87cb6feb94
1 changed files with 6 additions and 4 deletions
|
|
@ -215,10 +215,12 @@ uint32_t SStrHashHT(const char* string) {
|
|||
size_t SStrLen(const char* string) {
|
||||
STORM_ASSERT(string);
|
||||
|
||||
const char* c;
|
||||
for (c = string; *c; ++c)
|
||||
;
|
||||
return c - string;
|
||||
auto stringEnd = string;
|
||||
while (*stringEnd) {
|
||||
stringEnd++;
|
||||
}
|
||||
|
||||
return stringEnd - string;
|
||||
}
|
||||
|
||||
void SStrLower(char* string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue