Move string helpers out of HomeActivity into StringUtils

This commit is contained in:
Dave Allie
2026-01-14 21:24:45 +11:00
parent 78536733de
commit 62f6e62eae
3 changed files with 30 additions and 28 deletions
+6
View File
@@ -16,4 +16,10 @@ std::string sanitizeFilename(const std::string& name, size_t maxLength = 100);
*/
bool checkFileExtension(const std::string& fileName, const char* extension);
// UTF-8 safe string truncation - removes one character from the end
// Returns the new size after removing one UTF-8 character
size_t utf8RemoveLastChar(std::string& str);
// Truncate string by removing N UTF-8 characters from the end
void utf8TruncateChars(std::string& str, size_t numChars);
} // namespace StringUtils