From 4aee4e80bd3e46a72a1441e5e41cd40a77c22e65 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 8 Mar 2023 13:00:17 -0500 Subject: [PATCH] AK: Add a Utf32View::substring_view overload to take only an offset This is for convenience, and matches our other UTF-N views. --- AK/Utf32View.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AK/Utf32View.h b/AK/Utf32View.h index 8009879c9c0..a8e4db153cf 100644 --- a/AK/Utf32View.h +++ b/AK/Utf32View.h @@ -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 {