Revert e266ccd which broke str_to_upper() and str_to_lower()

This commit is contained in:
aristocratos
2025-05-03 13:25:46 +02:00
parent 99dac3eb76
commit c3b225f536

View File

@@ -238,13 +238,13 @@ namespace Tools {
//* Return <str> with only uppercase characters
inline auto str_to_upper(string str) {
std::ranges::for_each(str, ::toupper);
std::ranges::for_each(str, [](auto& c) { c = ::toupper(c); } );
return str;
}
//* Return <str> with only lowercase characters
inline auto str_to_lower(string str) {
std::ranges::for_each(str, ::tolower);
std::ranges::for_each(str, [](char& c) { c = ::tolower(c); } );
return str;
}