aboutsummaryrefslogtreecommitdiff
path: root/common/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/str.h')
-rw-r--r--common/str.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/common/str.h b/common/str.h
index 4ca744193d..5c04f85f59 100644
--- a/common/str.h
+++ b/common/str.h
@@ -87,6 +87,26 @@ public:
void toLowercase();
void toUppercase();
+public:
+ typedef char * iterator;
+ typedef const char * const_iterator;
+
+ iterator begin() {
+ return _str;
+ }
+
+ iterator end() {
+ return begin() + size();
+ }
+
+ const_iterator begin() const {
+ return _str;
+ }
+
+ const_iterator end() const {
+ return begin() + size();
+ }
+
protected:
void ensureCapacity(int new_len, bool keep_old);
void decRefCount();