1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:57:44 +00:00

AK: Add the Utf8View::{contains, trim} helper methods

This commit is contained in:
Idan Horowitz 2021-06-16 14:17:03 +03:00 committed by Linus Groh
parent 8ba0533138
commit fea6d952a4
2 changed files with 44 additions and 0 deletions

View file

@ -75,6 +75,9 @@ public:
bool is_empty() const { return m_string.is_empty(); }
bool starts_with(const Utf8View&) const;
bool contains(u32) const;
Utf8View trim(const Utf8View& characters, TrimMode mode = TrimMode::Both) const;
size_t iterator_offset(const Utf8CodePointIterator& it) const
{