summaryrefslogtreecommitdiff
path: root/source/fud_utf8_iterator.cpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-09-23 07:36:16 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-09-23 07:36:16 -0500
commit0b860bb5dd6d2007db605291d239a6a9d41f57d1 (patch)
treefab140e03a3665236503d1405de9d33ba58ccc4a /source/fud_utf8_iterator.cpp
parent7da829d48f9059c83ab9cada2c850621e8bbd3f3 (diff)
Installable library.
Diffstat (limited to 'source/fud_utf8_iterator.cpp')
-rw-r--r--source/fud_utf8_iterator.cpp14
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