diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-02-20 14:04:42 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-02-22 10:14:36 +0100 |
commit | 832e9b8302087e1de49843b8b6db7581226003c8 (patch) | |
tree | a3aa7b45cc3e7be15d3d48662ae7f5dd09026907 /AK/Utf32View.h | |
parent | 0f205863465e88335d782e2e9c9ace81c9878727 (diff) | |
download | serenity-832e9b8302087e1de49843b8b6db7581226003c8.zip |
AK: Prepare Utf32View for use within templated LibGfx contexts
Forward declare its iterator and add a peek() method analagous to
Utf8CodePointIterator::peek().
Diffstat (limited to 'AK/Utf32View.h')
-rw-r--r-- | AK/Utf32View.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/AK/Utf32View.h b/AK/Utf32View.h index 2c3c122f99..8009879c9c 100644 --- a/AK/Utf32View.h +++ b/AK/Utf32View.h @@ -43,6 +43,9 @@ public: return *m_ptr; } + // NOTE: This returns {} if the peek is at or past EOF. + Optional<u32> peek(size_t offset = 0) const; + constexpr int code_point_length_in_bytes() const { return sizeof(u32); } bool done() const { return !m_length; } |