From 99475f93d957a805d788a4355831acbe6417f3b5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 27 Feb 2013 19:58:24 +0100 Subject: [PATCH] String: add rbegin/rend methods --- src/string.hh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/string.hh b/src/string.hh index f93c04d3..41060359 100644 --- a/src/string.hh +++ b/src/string.hh @@ -68,9 +68,12 @@ public: String replace(const String& expression, const String& replacement) const; using iterator = std::string::const_iterator; + using riterator = std::string::const_reverse_iterator; - iterator begin() const { return m_content.begin(); } - iterator end() const { return m_content.end(); } + iterator begin() const { return m_content.begin(); } + iterator end() const { return m_content.end(); } + riterator rbegin() const { return m_content.rbegin(); } + riterator rend() const { return m_content.rend(); } char front() const { return m_content.front(); } char back() const { return m_content.back(); }