Skip to content

Commit 683845e

Browse files
committed
Update string class to upstream version
1 parent 49a66b4 commit 683845e

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGELOG

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
SAMD CORE
22

3-
* Fixed Serial.flush() blocking before any writes. Thanks @hangmoh
4-
* Added snprintf_P to avr/pgmspace.h stub. Thanks @jantje
3+
* Fixed Serial.flush() blocking before any writes. Thanks @hangmoh
4+
* Added snprintf_P to avr/pgmspace.h stub. Thanks @jantje
5+
* Another small fix to String iterators. Thanks @Ivan-Perez @Chris--A
56

67
SAMD CORE 1.6.6 2016.05.19
78

cores/arduino/WString.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,12 @@ class String
159159
char& operator [] (unsigned int index);
160160
void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
161161
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
162-
{getBytes((unsigned char *)buf, bufsize, index);}
163-
const char * c_str() const { return buffer; }
164-
const char* begin() { return c_str(); }
165-
const char* end() { return c_str() + length(); }
162+
{ getBytes((unsigned char *)buf, bufsize, index); }
163+
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(); }
166168

167169
// search
168170
int indexOf( char ch ) const;

0 commit comments

Comments
 (0)