diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-11-08 10:21:15 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-11-08 13:10:41 +0100 |
commit | 1cce397af6d1c9dd588d4a16e2b33933bb30d2ea (patch) | |
tree | 31edc7bd1d0b4049f4604b4d3f13534e8b71de71 | |
parent | d78ae1d81410bd7930aede831cdf1f15ae4920af (diff) | |
download | glibmm-1cce397af6d1c9dd588d4a16e2b33933bb30d2ea.tar.gz |
ustring: Add cbegin() and cend().
As in std::string since C++11.
-rw-r--r-- | glib/glibmm/ustring.cc | 12 | ||||
-rw-r--r-- | glib/glibmm/ustring.h | 10 |
2 files changed, 22 insertions, 0 deletions
diff --git a/glib/glibmm/ustring.cc b/glib/glibmm/ustring.cc index 15ab0098..eae9802e 100644 --- a/glib/glibmm/ustring.cc +++ b/glib/glibmm/ustring.cc @@ -841,6 +841,18 @@ ustring::rend() const return const_reverse_iterator(const_iterator(string_.begin())); } +ustring::const_iterator +ustring::cbegin() const +{ + return const_iterator(string_.begin()); +} + +ustring::const_iterator +ustring::cend() const +{ + return const_iterator(string_.end()); +} + /**** Glib::ustring::find() ************************************************/ ustring::size_type diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h index 8e8a546b..fe45c1ac 100644 --- a/glib/glibmm/ustring.h +++ b/glib/glibmm/ustring.h @@ -469,6 +469,16 @@ public: const_reverse_iterator rbegin() const; const_reverse_iterator rend() const; + /** + * @newin{2,52} + */ + const_iterator cbegin() const; + + /** + * @newin{2,52} + */ + const_iterator cend() const; + //! @} //! @name Find sub-strings. //! @{ |