]> git.saurik.com Git - wxWidgets.git/commitdiff
added non-const begin()/end() methods to wxString (patch 696842)
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 24 Mar 2003 20:32:55 +0000 (20:32 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 24 Mar 2003 20:32:55 +0000 (20:32 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index ac039eaa63554a615a4ab4f24ee395b8b67d5649..521b7ca966fe5d7fbd0b42cae2a716479cae622f 100644 (file)
@@ -803,6 +803,8 @@ public:
 
   // standard types
   typedef wxChar value_type;
+  typedef size_t size_type;
+  typedef value_type *iterator;
   typedef const value_type *const_iterator;
 
   // an 'invalid' value for string index
@@ -848,6 +850,11 @@ public:
     // position one after the last valid one
   const_iterator end() const { return wx_str() + length(); }
 
+  // first valid index position
+  iterator begin() { CopyBeforeWrite(); return m_pchData; }
+  // position one after the last valid one
+  iterator end() { CopyBeforeWrite(); return m_pchData + length(); }
+
   // lib.string.modifiers
     // append a string
   wxString& append(const wxString& str)