1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-31 20:52:13 +01:00

Modified begin() & end() for read/write

begin() and end() only allowed read access, these changes now allow both.
This commit is contained in:
Christopher Andrews 2016-05-12 21:43:53 +10:00 committed by Cristian Maglie
parent f68a722bde
commit 0e8904350d

View File

@ -161,8 +161,10 @@ 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(); }
char* begin() { return buffer; }
char* end() { return buffer + length(); }
const char* begin() const { return c_str(); }
const char* end() const { return c_str() + length(); }
// search
int indexOf( char ch ) const;