From b876e97719c7f1e2a3838a548c5fb507847de988 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 22 Mar 2023 15:02:15 +0000 Subject: [PATCH] AK: Expose the current position of a Utf8CodePointIterator as a pointer --- AK/Utf8View.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AK/Utf8View.h b/AK/Utf8View.h index 7b51db861c..d7ae838dc7 100644 --- a/AK/Utf8View.h +++ b/AK/Utf8View.h @@ -38,6 +38,8 @@ public: return m_ptr - other.m_ptr; } + u8 const* ptr() const { return m_ptr; } + // Note : These methods return the information about the underlying UTF-8 bytes. // If the UTF-8 string encoding is not valid at the iterator's position, then the underlying bytes might be different from the // decoded character's re-encoded bytes (which will be an `0xFFFD REPLACEMENT CHARACTER` with an UTF-8 length of three bytes).