1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-06-12 05:01:56 +03:00

chore(codemanagement): nodeps headers, potentioal library

This commit is contained in:
Leonid Fedorov
2025-05-23 22:53:52 +00:00
parent 05ff8c1cbe
commit a0e676b64a

View File

@ -0,0 +1,15 @@
#pragma once
#include <algorithm>
#include <string>
namespace datatypes
{
inline bool ASCIIStringCaseInsensetiveEquals(const std::string& left, const std::string& right)
{
auto asciiHigher = [](char c) { return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; };
return left.size() == right.size() &&
std::equal(left.begin(), left.end(), right.begin(),
[&asciiHigher](char l, char r) { return asciiHigher(l) == asciiHigher(r); });
}
} // namespace datatypes