aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2005-05-15 13:20:52 +0000
committerMax Horn2005-05-15 13:20:52 +0000
commit343c5152c05e8475da81e28dd7bae7b926c73127 (patch)
tree11c62bac51c176c621e755fc8bf341aefb9073ca /common
parentfb11e793876b25e47fd4f35ed0f30d3febcc84b0 (diff)
downloadscummvm-rg350-343c5152c05e8475da81e28dd7bae7b926c73127.tar.gz
scummvm-rg350-343c5152c05e8475da81e28dd7bae7b926c73127.tar.bz2
scummvm-rg350-343c5152c05e8475da81e28dd7bae7b926c73127.zip
Added String::iterator
svn-id: r18105
Diffstat (limited to 'common')
-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();