AK: Add StringView operator==(char)

This commit is contained in:
Lucas CHOLLET 2022-06-10 18:52:14 +02:00 committed by Sam Atkins
parent 54be317fa9
commit 0396b6da82
Notes: sideshowbarker 2024-07-17 06:34:59 +09:00

View file

@ -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);