diff options
author | Max Horn | 2005-05-15 13:20:52 +0000 |
---|---|---|
committer | Max Horn | 2005-05-15 13:20:52 +0000 |
commit | 343c5152c05e8475da81e28dd7bae7b926c73127 (patch) | |
tree | 11c62bac51c176c621e755fc8bf341aefb9073ca /common | |
parent | fb11e793876b25e47fd4f35ed0f30d3febcc84b0 (diff) | |
download | scummvm-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.h | 20 |
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(); |