37 namespace core_strings
47 template<
class S,
class T>
48 inline S
to(
const T& str)
50 if constexpr (std::is_same<S, T>::value)
72 static bool eq(
char c1,
char c2)
74 return toupper(c1) == toupper(c2);
84 static bool ne(
char c1,
char c2)
86 return toupper(c1) != toupper(c2);
96 static bool lt(
char c1,
char c2)
98 return toupper(c1) < toupper(c2);
109 static int compare(
const char* s1,
const char* s2,
size_t n)
113 if (toupper(*s1) < toupper(*s2))
115 if (toupper(*s1) > toupper(*s2))
131 static const char*
find(
const char* s,
int n,
char a)
135 if (toupper(*s) == toupper(a))
165 return std::hash<std::string>{}(std::string(s.data()));
std::basic_string< char, CaseInsensitiveCharTraits > CaseInsensitiveString
static int compare(const char *s1, const char *s2, size_t n)
static bool eq(char c1, char c2)
static bool ne(char c1, char c2)
static const char * find(const char *s, int n, char a)
static bool lt(char c1, char c2)
std::size_t operator()(const hal::core_strings::CaseInsensitiveString &s) const