From dbb305fa27baada32d29d6f8904bdc02ac494e13 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Wed, 25 Sep 2024 11:41:50 -0500 Subject: Add iterator to string api. --- source/fud_string.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source') diff --git a/source/fud_string.cpp b/source/fud_string.cpp index 57bf1e0..74742e1 100644 --- a/source/fud_string.cpp +++ b/source/fud_string.cpp @@ -287,6 +287,16 @@ String String::append(const String& rhs) const return output; } +const utf8* String::begin() const +{ + return data(); +} + +const utf8* String::end() const +{ + return data() + size(); +} + bool StringView::nullTerminated() const { return m_data != nullptr && m_data[m_length] == '\0'; -- cgit v1.2.3