1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:37:36 +00:00

AK: Add Utf8View::iterator_at_byte_offset method

This implements a method to get a Utf8CodepointIterator at a specified
byte offset.
This commit is contained in:
Max Wipfli 2021-05-18 16:09:20 +02:00 committed by Andreas Kling
parent c1b452f754
commit a72bb34970
2 changed files with 12 additions and 0 deletions

View file

@ -54,6 +54,7 @@ public:
Utf8CodepointIterator begin() const;
Utf8CodepointIterator end() const;
Utf8CodepointIterator iterator_at_byte_offset(size_t) const;
const unsigned char* bytes() const { return begin_ptr(); }
size_t byte_length() const { return m_string.length(); }