Remove null terminating chars from profile names before using them in ProfileManager

This commit is contained in:
morg committed 2023-12-06 10:33:57 +01:00
1 parent 6d562d8d37
commit 2eb43fa445
3 files changed
+21 -1

No files matched your search

+11
View File
@@ -38,3 +38,14 @@ const char* StringUtils::wchar_to_char(const wchar_t* pwchar)
return filePathC;
}
const std::string StringUtils::remove_null_terminating_chars(std::string input)
{
while (!input.empty() && input.back() == 0)
{
input.pop_back();
}
return input;
}