0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd: Add ircd::empty(string_view).

This commit is contained in:
Jason Volk 2017-11-06 12:09:18 -08:00
parent 7f97ffdede
commit 8811bf8a51

View file

@ -38,6 +38,7 @@ namespace ircd
template<int (&test)(int) = std::isprint> auto ctype(const string_view &s);
size_t size(const string_view &);
bool empty(const string_view &);
bool operator!(const string_view &);
bool defined(const string_view &);
bool null(const string_view &);
@ -326,6 +327,12 @@ struct ircd::byte_view<ircd::string_view>
inline bool
ircd::operator!(const string_view &str)
{
return empty(str);
}
inline bool
ircd::empty(const string_view &str)
{
return str.empty();
}