AK: Add Utf8View::contains_any_of()

Useful when you need to check for more than one code point, some of
which are multiple bytes. (In which case StringView::contains() will
return wrong results.)
This commit is contained in:
Sam Atkins 2025-01-08 12:56:45 +00:00
commit b16b24c615
Notes: github-actions[bot] 2025-02-04 08:50:31 +00:00
2 changed files with 13 additions and 0 deletions

View file

@ -115,6 +115,7 @@ public:
bool is_null() const { return m_string.is_null(); }
bool starts_with(Utf8View const&) const;
bool contains(u32) const;
bool contains_any_of(ReadonlySpan<u32>) const;
Utf8View trim(Utf8View const& characters, TrimMode mode = TrimMode::Both) const;