| 51 | } |
| 52 | |
| 53 | std::wstring Lower(std::wstring value) { |
| 54 | for (wchar_t& ch : value) { |
| 55 | if (ch >= L'A' && ch <= L'Z') ch = static_cast<wchar_t>(ch - L'A' + L'a'); |
| 56 | } |
| 57 | return value; |
| 58 | } |
| 59 | |
| 60 | bool EqualsInsensitive(std::wstring_view lhs, std::wstring_view rhs) { |
| 61 | return Lower(std::wstring(lhs)) == Lower(std::wstring(rhs)); |