38#include <seastar/util/modules.hh>
39#include <seastar/core/sstring.hh>
45SEASTAR_MODULE_EXPORT_BEGIN
50struct case_insensitive_cmp {
51 bool operator()(
const sstring& s1,
const sstring& s2)
const {
52 return std::equal(s1.begin(), s1.end(), s2.begin(), s2.end(),
53 [](
char a,
char b) { return ::tolower(a) == ::tolower(b); });
57struct case_insensitive_hash {
58 size_t operator()(sstring s)
const {
59 std::transform(s.begin(), s.end(), s.begin(), ::tolower);
60 return std::hash<sstring>()(s);
64SEASTAR_MODULE_EXPORT_END
Seastar API namespace.
Definition: abort_on_ebadf.hh:26