mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-22 02:26:11 +00:00
AK: Add StringView operator==(char)
This commit is contained in:
parent
54be317fa9
commit
0396b6da82
|
@ -227,6 +227,11 @@ public:
|
|||
return *cp == '\0';
|
||||
}
|
||||
|
||||
constexpr bool operator==(char const c) const
|
||||
{
|
||||
return m_length == 1 && *m_characters == c;
|
||||
}
|
||||
|
||||
constexpr bool operator!=(char const* cstring) const
|
||||
{
|
||||
return !(*this == cstring);
|
||||
|
|
Loading…
Reference in a new issue