Commit 0489fe3a authored by Christopher Andrews's avatar Christopher Andrews Committed by Cristian Maglie

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 );
```
parent 5e194bd8
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment