String: add rbegin/rend methods

This commit is contained in:
Maxime Coste 2013-02-27 19:58:24 +01:00
parent f82a2e22a1
commit 99475f93d9

View File

@ -68,9 +68,12 @@ public:
String replace(const String& expression, const String& replacement) const; String replace(const String& expression, const String& replacement) const;
using iterator = std::string::const_iterator; using iterator = std::string::const_iterator;
using riterator = std::string::const_reverse_iterator;
iterator begin() const { return m_content.begin(); } iterator begin() const { return m_content.begin(); }
iterator end() const { return m_content.end(); } 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 front() const { return m_content.front(); }
char back() const { return m_content.back(); } char back() const { return m_content.back(); }