- bool result = false;
- if( a.length() == b.length() )
- {
- result = std::equal( a.begin(), a.end(), b.begin(), CaseInsensitiveCharacterCompare );
- }
- return result;
+ return (a.length() == b.length()) && std::equal(a.begin(), a.end(), b.begin(), [](auto x, auto y) {
+ return std::tolower(x) == std::tolower(y);
+ });