mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-15 08:49:20 +01:00
Create Common::ToLower and Common::ToUpper
This commit is contained in:
parent
e627718560
commit
aaec64501a
@ -669,3 +669,16 @@ std::string GetEscapedHtml(std::string html)
|
|||||||
}
|
}
|
||||||
return 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
|
||||||
|
@ -240,3 +240,17 @@ std::vector<std::string> CommandLineToUtf8Argv(const wchar_t* command_line);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string GetEscapedHtml(std::string html);
|
std::string GetEscapedHtml(std::string html);
|
||||||
|
|
||||||
|
namespace Common
|
||||||
|
{
|
||||||
|
inline char ToLower(char ch)
|
||||||
|
{
|
||||||
|
return std::tolower(ch, std::locale::classic());
|
||||||
|
}
|
||||||
|
inline char ToUpper(char ch)
|
||||||
|
{
|
||||||
|
return std::toupper(ch, std::locale::classic());
|
||||||
|
}
|
||||||
|
void ToLower(std::string* str);
|
||||||
|
void ToUpper(std::string* str);
|
||||||
|
} // namespace Common
|
||||||
|
Loading…
x
Reference in New Issue
Block a user