#ifndef ARBUTILS_CONSTSTRING_HPP #define ARBUTILS_CONSTSTRING_HPP #include #include #include #include #include "__ConstStringCore.hpp" ConstStringCore( ConstString, inline static uint32_t constexpr Hash(char const* input) { return (*input) ? static_cast((*input)) + 33 * Hash(input + 1) : 5381; };) inline constexpr Arbutils::ConstString operator"" _const(const char* c, size_t l) { return Arbutils::ConstString(c, l); } inline constexpr Arbutils::ConstString operator"" _c(const char* c, size_t l) { return Arbutils::ConstString(c, l); } ConstStringCore( CaseInsensitiveConstString, inline static constexpr char charToLower(const char c) { return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c; } inline static uint32_t constexpr Hash(char const* input) { return charToLower(*input) ? static_cast(charToLower(*input)) + 33 * Hash(input + 1) : 5381; };); inline constexpr Arbutils::CaseInsensitiveConstString operator"" _const_nocase(const char* c, size_t l) { return Arbutils::CaseInsensitiveConstString(c, l); } inline constexpr Arbutils::CaseInsensitiveConstString operator"" _cnc(const char* c, size_t l) { return Arbutils::CaseInsensitiveConstString(c, l); } #endif // ARBUTILS_CONSTSTRING_HPP