Added string iterator in sam core.

See #2179
This commit is contained in:
Cristian Maglie 2016-04-20 17:07:54 +02:00
parent 500a3fdbe7
commit 1c76ee9d7c
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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;