class name_view
#
-
class name_view#
A non-owning reference to a name or value of an MIME type. Provides case-insensitive comparison operators.
Public Functions
-
name_view() = default#
Default construct an empty
name_view
.
-
inline name_view(const char *s)#
Construct from a raw string.
-
inline name_view(std::string_view sv)#
Construct from a string view.
-
inline auto to_string() const -> std::string#
Convert to a string with lower-case ascii characters.
-
inline explicit operator std::string_view() const noexcept#
Return the underlying string_view.
Friends
-
inline friend auto operator==(const name_view &lhs, const name_view &rhs) -> bool#
Compare
name_view
s for equality.- DESCRIPTION
Compare
name_view
s for equality. It’s considered equivalent if and only if thesource
ofname_view
s are case-insensitively equivalent.
-
inline friend auto operator==(const name_view &lhs, const std::string_view &rhs) -> bool#
Compare
name_view
‘s equivalence against a string.- DESCRIPTION
Compare
name_view
‘s equivalence against a string. It’s considered equivalent if and only if thesource
of thename_view
are case-insensitively equivalent to the string.
-
inline friend auto operator==(const name_view &lhs, const char *rhs) -> bool#
Compare
name_view
‘s equivalence against a raw string.- DESCRIPTION
Compare
name_view
‘s equivalence against a raw string. It’s considered equivalent if and only if thesource
of thename_view
are case-insensitively equivalent to the raw string.
-
inline friend auto operator<=>(const name_view &lhs, const name_view &rhs) -> std::strong_ordering#
Three-way compare
name_view
s lexicographically.- DESCRIPTION
Three-way compare
name_view
s lexicographically. The comparison is performed case-insensitively.
-
name_view() = default#