StringUtils.cpp
1 #include "pch.h" 2 3 #include "StringUtils.h" 4 5 namespace StringUtils 6 { 7 bool CaseInsensitiveEquals(const std::wstring& str1, const std::wstring& str2) 8 { 9 if (str1.size() != str2.size()) 10 { 11 return false; 12 } 13 14 return std::equal(str1.begin(), str1.end(), str2.begin(), [](wchar_t ch1, wchar_t ch2) { 15 return towupper(ch1) == towupper(ch2); 16 }); 17 } 18 }