1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 07:34:57 +00:00

AK: Add a Utf32View::substring_view overload to take only an offset

This is for convenience, and matches our other UTF-N views.
This commit is contained in:
Timothy Flynn 2023-03-08 13:00:17 -05:00 committed by Linus Groh
parent beba05471c
commit 4aee4e80bd

View file

@ -109,6 +109,11 @@ public:
return Utf32View(m_code_points + offset, length); return Utf32View(m_code_points + offset, length);
} }
Utf32View substring_view(size_t offset) const
{
return substring_view(offset, length() - offset);
}
private: private:
u32 const* begin_ptr() const u32 const* begin_ptr() const
{ {