You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-4696: get rid of boost::iequals
This commit is contained in:
committed by
Leonid Fedorov
parent
90023272dd
commit
25c20bae9b
@ -270,4 +270,12 @@ class CollationAwareComparator : public Charset
|
||||
}
|
||||
};
|
||||
|
||||
inline bool ASCIIStringCaseInsensetiveEquals(const std::string& left, const std::string& right)
|
||||
{
|
||||
auto asciiLower = [](char c) { return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; };
|
||||
return left.size() == right.size() &&
|
||||
std::equal(left.begin(), left.end(), right.begin(),
|
||||
[&asciiLower](char l, char r) { return asciiLower(l) == asciiLower(r); });
|
||||
}
|
||||
|
||||
} // end of namespace datatypes
|
||||
|
Reference in New Issue
Block a user