diff options
| author | JMC47 <JMC4789@gmail.com> | 2024-09-26 18:24:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-26 18:24:36 -0400 |
| commit | b1cd4a6690241f2372fc7ef1471e4e23f1366ac1 (patch) | |
| tree | 239ac4e42d0cd99c6d0344ded7bb7decc55ac69b /Source/Core/Common/StringUtil.h | |
| parent | d4d3acb79637b683fcd2ce52f420200fb70b87c9 (diff) | |
| parent | 508ccc2054590a9efa89054e742b74521f272063 (diff) | |
Merge pull request #13068 from mitaclaw/redundant-case-insensitive
IniFile: Migrate `Common::CaseInsensitiveLess` to StringUtil
Diffstat (limited to 'Source/Core/Common/StringUtil.h')
| -rw-r--r-- | Source/Core/Common/StringUtil.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h index d29ff5a3c6..8aa5bd3f68 100644 --- a/Source/Core/Common/StringUtil.h +++ b/Source/Core/Common/StringUtil.h @@ -313,5 +313,13 @@ std::string GetEscapedHtml(std::string html); void ToLower(std::string* str); void ToUpper(std::string* str); bool CaseInsensitiveEquals(std::string_view a, std::string_view b); + +// 'std::less'-like comparison function object type for case-insensitive strings. +struct CaseInsensitiveLess +{ + using is_transparent = void; // Allow heterogenous lookup. + bool operator()(std::string_view a, std::string_view b) const; +}; + std::string BytesToHexString(std::span<const u8> bytes); } // namespace Common |
