[String] Port changes from S1x

This commit is contained in:
Edo 2022-04-10 04:04:14 +02:00 committed by GitHub
parent 87400dab4d
commit 5bfccfbfff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,9 +18,9 @@ namespace utils::string
std::string to_lower(std::string text)
{
std::transform(text.begin(), text.end(), text.begin(), [](const char input)
std::transform(text.begin(), text.end(), text.begin(), [](const unsigned char input)
{
return CHAR(tolower(input));
return static_cast<char>(std::tolower(input));
});
return text;
@ -28,9 +28,9 @@ namespace utils::string
std::string to_upper(std::string text)
{
std::transform(text.begin(), text.end(), text.begin(), [](const char input)
std::transform(text.begin(), text.end(), text.begin(), [](const unsigned char input)
{
return CHAR(toupper(input));
return static_cast<char>(std::toupper(input));
});
return text;