You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
chore(codemanagement): nodeps headers, potentioal library
This commit is contained in:
15
utils/basic/string_utils.h
Normal file
15
utils/basic/string_utils.h
Normal 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
|
Reference in New Issue
Block a user