diff --git a/build/shared/revisions.txt b/build/shared/revisions.txt index efc71ccbd..ad1ba9596 100644 --- a/build/shared/revisions.txt +++ b/build/shared/revisions.txt @@ -17,6 +17,7 @@ ARDUINO 1.6.9 * Fixed Ctrl+Del: now deletes the word behind the cursor instead of the entire line. Thanks @avargas-nearsoft [core] +* String class now supports iterators. Thanks @Chris--A * sam: Allow 3rd party boards that depend on SAM core to use their own USB vid/pid and manufacturer/product strings. Thanks @philmanofsky. * avr: Check at runtime if 32u4 boards are shipped with new bootloader; if so diff --git a/hardware/arduino/sam/cores/arduino/WString.h b/hardware/arduino/sam/cores/arduino/WString.h index b04798087..7335d4ed5 100644 --- a/hardware/arduino/sam/cores/arduino/WString.h +++ b/hardware/arduino/sam/cores/arduino/WString.h @@ -161,6 +161,8 @@ public: void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const {getBytes((unsigned char *)buf, bufsize, index);} const char * c_str() const { return buffer; } + const char* begin() { return c_str(); } + const char* end() { return c_str() + length(); } // search int indexOf( char ch ) const;