mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +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:
parent
beba05471c
commit
4aee4e80bd
Notes:
sideshowbarker
2024-07-17 03:03:15 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/4aee4e80bd Pull-request: https://github.com/SerenityOS/serenity/pull/17769 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/linusg ✅
1 changed files with 5 additions and 0 deletions
|
@ -109,6 +109,11 @@ public:
|
|||
return Utf32View(m_code_points + offset, length);
|
||||
}
|
||||
|
||||
Utf32View substring_view(size_t offset) const
|
||||
{
|
||||
return substring_view(offset, length() - offset);
|
||||
}
|
||||
|
||||
private:
|
||||
u32 const* begin_ptr() const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue