@@ -58,6 +58,7 @@ class String
58
58
// be false).
59
59
String (const char *cstr = " " );
60
60
String (const String &str);
61
+ String (const __FlashStringHelper *str);
61
62
#ifdef __GXX_EXPERIMENTAL_CXX0X__
62
63
String (String &&rval);
63
64
String (StringSumHelper &&rval);
@@ -82,6 +83,7 @@ class String
82
83
// marked as invalid ("if (s)" will be false).
83
84
String & operator = (const String &rhs);
84
85
String & operator = (const char *cstr);
86
+ String & operator = (const __FlashStringHelper *str);
85
87
#ifdef __GXX_EXPERIMENTAL_CXX0X__
86
88
String & operator = (String &&rval);
87
89
String & operator = (StringSumHelper &&rval);
@@ -100,17 +102,19 @@ class String
100
102
unsigned char concat (unsigned int num);
101
103
unsigned char concat (long num);
102
104
unsigned char concat (unsigned long num);
105
+ unsigned char concat (const __FlashStringHelper * str);
103
106
104
107
// if there's not enough memory for the concatenated value, the string
105
108
// will be left unchanged (but this isn't signalled in any way)
106
109
String & operator += (const String &rhs) {concat (rhs); return (*this );}
107
110
String & operator += (const char *cstr) {concat (cstr); return (*this );}
108
111
String & operator += (char c) {concat (c); return (*this );}
109
- String & operator += (unsigned char num) {concat (num); return (*this );}
112
+ String & operator += (unsigned char num) {concat (num); return (*this );}
110
113
String & operator += (int num) {concat (num); return (*this );}
111
114
String & operator += (unsigned int num) {concat (num); return (*this );}
112
115
String & operator += (long num) {concat (num); return (*this );}
113
116
String & operator += (unsigned long num) {concat (num); return (*this );}
117
+ String & operator += (const __FlashStringHelper *str){concat (str); return (*this );}
114
118
115
119
friend StringSumHelper & operator + (const StringSumHelper &lhs, const String &rhs);
116
120
friend StringSumHelper & operator + (const StringSumHelper &lhs, const char *cstr);
@@ -120,6 +124,7 @@ class String
120
124
friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned int num);
121
125
friend StringSumHelper & operator + (const StringSumHelper &lhs, long num);
122
126
friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long num);
127
+ friend StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs);
123
128
124
129
// comparison (only works w/ Strings and "strings")
125
130
operator StringIfHelperType () const { return buffer ? &String::StringIfHelper : 0 ; }
@@ -184,6 +189,7 @@ class String
184
189
185
190
// copy and move
186
191
String & copy (const char *cstr, unsigned int length);
192
+ String & copy (const __FlashStringHelper *pstr, unsigned int length);
187
193
#ifdef __GXX_EXPERIMENTAL_CXX0X__
188
194
void move (String &rhs);
189
195
#endif
0 commit comments