Create Common::ToLower and Common::ToUpper

This commit is contained in:
Pokechu22 2022-01-16 16:23:12 -08:00
parent e627718560
commit aaec64501a
2 changed files with 27 additions and 0 deletions

View file

@ -669,3 +669,16 @@ std::string GetEscapedHtml(std::string html)
}
return html;
}
namespace Common
{
void ToLower(std::string* str)
{
std::transform(str->begin(), str->end(), str->begin(), [](char c) { return Common::ToLower(c); });
}
void ToUpper(std::string* str)
{
std::transform(str->begin(), str->end(), str->begin(), [](char c) { return Common::ToUpper(c); });
}
} // namespace Common