diff options
Diffstat (limited to 'source/fud_utf8_iterator.cpp')
-rw-r--r-- | source/fud_utf8_iterator.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/fud_utf8_iterator.cpp b/source/fud_utf8_iterator.cpp index 4476050..2557dc0 100644 --- a/source/fud_utf8_iterator.cpp +++ b/source/fud_utf8_iterator.cpp @@ -25,13 +25,13 @@ std::optional<FudUtf8> Utf8Iterator::peek() const return std::nullopt; } - auto utf8 = FudUtf8::fromStringView(m_view, m_index); + auto character = FudUtf8::fromStringView(m_view, m_index); - if (!utf8.valid()) { + if (!character.valid()) { return std::nullopt; } - return utf8; + return character; } std::optional<FudUtf8> Utf8Iterator::next() @@ -41,15 +41,15 @@ std::optional<FudUtf8> Utf8Iterator::next() return std::nullopt; } - auto utf8 = FudUtf8::fromStringView(m_view, m_index); + auto character = FudUtf8::fromStringView(m_view, m_index); - if (!utf8.valid()) { + if (!character.valid()) { m_index = m_view.length(); return std::nullopt; } - m_index += utf8.size(); - return utf8; + m_index += character.size(); + return character; } } // namespace fud |