diff --git a/src/String/StringView.hpp b/src/String/StringView.hpp index 6aeaa38..1442c76 100644 --- a/src/String/StringView.hpp +++ b/src/String/StringView.hpp @@ -124,13 +124,17 @@ namespace ArbUt { /// @return std::string_view. [[nodiscard]] inline std::string_view std_str() const noexcept final { return _str->GetValue(); } + /// @brief Check equality with standard C++ string. inline constexpr bool operator==(const std::string_view& rhs) const noexcept final { return _hash == Hash(rhs.data()); } + /// @brief Check inequality with standard C++ string. inline constexpr bool operator!=(const std::string_view& rhs) const noexcept final { return _hash != Hash(rhs.data()); } + /// @brief Check equality with standard C style string. inline constexpr bool operator==(const char* non_null rhs) const noexcept final { return _hash == Hash(rhs); } + /// @brief Check inequality with standard C style string. inline constexpr bool operator!=(const char* non_null rhs) const noexcept final { return _hash != Hash(rhs); } /// @brief Calculates the hash for a given C string.