Skip to content

Commit 93cba04

Browse files
committed
WString: Align with Arduino
Add String iterators Signed-off-by: Frederic.Pillon <[email protected]>
1 parent ffe098f commit 93cba04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cores/arduino/WString.h

+4
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ class String
161161
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
162162
{getBytes((unsigned char *)buf, bufsize, index);}
163163
const char * c_str() const { return buffer; }
164+
char* begin() { return buffer; }
165+
char* end() { return buffer + length(); }
166+
const char* begin() const { return c_str(); }
167+
const char* end() const { return c_str() + length(); }
164168

165169
// search
166170
int indexOf( char ch ) const;

0 commit comments

Comments
 (0)