diff --git a/AK/StringView.cpp b/AK/StringView.cpp index 6150943bf9b..e9e8c7f90f4 100644 --- a/AK/StringView.cpp +++ b/AK/StringView.cpp @@ -167,6 +167,8 @@ bool StringView::contains(u32 needle) const bool StringView::contains(StringView needle, CaseSensitivity case_sensitivity) const { + if (needle.length() == 1) + return contains(needle.characters_without_null_termination()[0]); return StringUtils::contains(*this, needle, case_sensitivity); }