Remove unused safe_strtrunc()

This commit is contained in:
Gymnasiast committed 2023-01-08 15:41:11 +01:00
1 parent 41cc3fd563
commit 6b922eea4a
2 files changed
-27

No files matched your search

-26
View File
@@ -266,32 +266,6 @@ int32_t strlogicalcmp(const char* s1, const char* s2)
}
}
utf8* safe_strtrunc(utf8* text, size_t size)
{
assert(text != nullptr);
if (size == 0)
return text;
const char* sourceLimit = text + size - 1;
char* ch = text;
char* last = text;
while (utf8_get_next(ch, const_cast<const utf8**>(&ch)) != 0)
{
if (ch <= sourceLimit)
{
last = ch;
}
else
{
break;
}
}
*last = 0;
return text;
}
char* safe_strcpy(char* destination, const char* source, size_t size)
{
assert(destination != nullptr);
-1
View File
@@ -32,7 +32,6 @@ void bitcount_init();
int32_t bitcount(uint32_t source);
int32_t strcicmp(char const* a, char const* b);
int32_t strlogicalcmp(char const* a, char const* b);
utf8* safe_strtrunc(utf8* text, size_t size);
char* safe_strcpy(char* destination, const char* source, size_t num);
char* safe_strcat(char* destination, const char* source, size_t size);
#if defined(_WIN32)