WString.h: allow modifying the string while iterating

This commit is contained in:
Ivan-Perez 2016-05-12 13:27:56 +02:00 committed by Cristian Maglie
parent 69421dc2c7
commit 2d13ebbb3e
1 changed files with 3 additions and 1 deletions

View File

@ -159,8 +159,10 @@ public:
char& operator [] (unsigned int index);
void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
{getBytes((unsigned char *)buf, bufsize, index);}
{ getBytes((unsigned char *)buf, bufsize, index); }
const char* c_str() const { return buffer; }
char* begin() { return buffer; }
char* end() { return buffer + length(); }
const char* begin() const { return c_str(); }
const char* end() const { return c_str() + length(); }