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:
parent
7f97ffdede
commit
8811bf8a51
1 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue