summaryrefslogtreecommitdiff
path: root/source/fud_string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/fud_string.cpp')
-rw-r--r--source/fud_string.cpp25
1 files changed, 0 insertions, 25 deletions
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_t>(size) < maxLength) {
- size++;
- }
-
- if (str[size] != 0 && static_cast<size_t>(size) == maxLength) {
- return static_cast<ssize_t>(maxLength) + 1;
- }
-
- return size;
-}
-
StringResult String::makeFromCString(const char* cString)
{
return makeFromCString(cString, &globalFudAllocator);