From 6a27a2a4032e88fa9154ef0f0741edc584f7a701 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sun, 20 Oct 2024 10:48:19 -0500 Subject: Lots of work. --- source/fud_string.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'source/fud_string.cpp') diff --git a/source/fud_string.cpp b/source/fud_string.cpp index d354fe7..b714dfc 100644 --- a/source/fud_string.cpp +++ b/source/fud_string.cpp @@ -23,31 +23,6 @@ namespace fud { -ssize_t cStringLength(const char* str) -{ - constexpr auto maxLength = SSIZE_MAX - 1; - return cStringLength(str, maxLength); -} - -ssize_t cStringLength(const char* str, size_t maxLength) -{ - if (str == nullptr || maxLength > (SSIZE_MAX - 1)) { - return -1; - } - - ssize_t size = 0; - - while (str[size] != 0 && static_cast(size) < maxLength) { - size++; - } - - if (str[size] != 0 && static_cast(size) == maxLength) { - return static_cast(maxLength) + 1; - } - - return size; -} - StringResult String::makeFromCString(const char* cString) { return makeFromCString(cString, &globalFudAllocator); -- cgit v1.2.3