Skip to content

Commit 1c76ee9

Browse files
committed
Added string iterator in sam core.
See #2179
1 parent 500a3fd commit 1c76ee9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: build/shared/revisions.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ARDUINO 1.6.9
1717
* Fixed Ctrl+Del: now deletes the word behind the cursor instead of the entire line. Thanks @avargas-nearsoft
1818

1919
[core]
20+
* String class now supports iterators. Thanks @Chris--A
2021
* sam: Allow 3rd party boards that depend on SAM core to use their own
2122
USB vid/pid and manufacturer/product strings. Thanks @philmanofsky.
2223
* avr: Check at runtime if 32u4 boards are shipped with new bootloader; if so

Diff for: hardware/arduino/sam/cores/arduino/WString.h

+2
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ 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+
const char* begin() { return c_str(); }
165+
const char* end() { return c_str() + length(); }
164166

165167
// search
166168
int indexOf( char ch ) const;

0 commit comments

Comments
 (0)