mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
AK: Add StringView operator==(char)
This commit is contained in:
committed by
Sam Atkins
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);
|
||||
|
||||
Reference in New Issue
Block a user