mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-22 13:19:48 +01:00
Updated String library to use C++11 iterators.
This will allow using the String library in a ranged for loop: ```C++ String s = "Hi, this is a test"; for( char c : s ) Serial.print( c ); ```
This commit is contained in:
parent
2ddbf01334
commit
8e385bfbaf
@ -89,6 +89,8 @@ public:
|
||||
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
String & operator = (String &&rval);
|
||||
String & operator = (StringSumHelper &&rval);
|
||||
auto begin() -> const char* { return c_str(); }
|
||||
auto end() -> const char* { return c_str() + length(); }
|
||||
#endif
|
||||
|
||||
// concatenate (works w/ built-in types)
|
||||
|
Loading…
x
Reference in New Issue
Block a user