AK: Add StringView::equals_ignoring_case()

StringUtils::equals_ignoring_case() already operates on a StringView&,
so StringView should have the method directly without having to go
through a temporary String (which also has the method).
This commit is contained in:
Linus Groh
2020-05-13 17:59:31 +01:00
committed by Andreas Kling
parent 6cd4d136a0
commit 1277290a4a
2 changed files with 6 additions and 0 deletions

View File

@@ -166,6 +166,11 @@ bool StringView::contains(char needle) const
return false;
}
bool StringView::equals_ignoring_case(const StringView& other) const
{
return StringUtils::equals_ignoring_case(*this, other);
}
StringView StringView::substring_view(size_t start, size_t length) const
{
ASSERT(start + length <= m_length);