diff --git a/src/btop_tools.hpp b/src/btop_tools.hpp index c87bc69..2bdeadd 100644 --- a/src/btop_tools.hpp +++ b/src/btop_tools.hpp @@ -219,14 +219,14 @@ namespace Tools { } //* Return with only uppercase characters - inline string str_to_upper(string str) { - std::ranges::for_each(str, [](auto& c) { c = ::toupper(c); } ); + inline auto str_to_upper(string str) { + std::ranges::for_each(str, ::toupper); return str; } //* Return with only lowercase characters - inline string str_to_lower(string str) { - std::ranges::for_each(str, [](char& c) { c = ::tolower(c); } ); + inline auto str_to_lower(string str) { + std::ranges::for_each(str, ::tolower); return str; }