@@ -89,7 +89,7 @@ class String
8989// return true on success, false on failure (in which case, the string
9090// is left unchanged). reserve(0), if successful, will validate an
9191// invalid string (i.e., "if (s)" will be true afterwards)
92- unsigned char reserve (unsigned int size);
92+ bool reserve (unsigned int size);
9393inline unsigned int length (void )const {return len;}
9494
9595// creates a copy of the assigned value. if the value is null or
@@ -107,19 +107,19 @@ class String
107107// returns true on success, false on failure (in which case, the string
108108// is left unchanged). if the argument is null or invalid, the
109109// concatenation is considered unsucessful.
110- unsigned char concat (const String &str);
111- unsigned char concat (const char *cstr);
112- unsigned char concat (const char *cstr,unsigned int length);
113- unsigned char concat (const uint8_t *cstr,unsigned int length) {return concat ((const char *)cstr, length);}
114- unsigned char concat (char c);
115- unsigned char concat (unsigned char num);
116- unsigned char concat (int num);
117- unsigned char concat (unsigned int num);
118- unsigned char concat (long num);
119- unsigned char concat (unsigned long num);
120- unsigned char concat (float num);
121- unsigned char concat (double num);
122- unsigned char concat (const __FlashStringHelper * str);
110+ bool concat (const String &str);
111+ bool concat (const char *cstr);
112+ bool concat (const char *cstr,unsigned int length);
113+ bool concat (const uint8_t *cstr,unsigned int length) {return concat ((const char *)cstr, length);}
114+ bool concat (char c);
115+ bool concat (unsigned char num);
116+ bool concat (int num);
117+ bool concat (unsigned int num);
118+ bool concat (long num);
119+ bool concat (unsigned long num);
120+ bool concat (float num);
121+ bool concat (double num);
122+ bool concat (const __FlashStringHelper * str);
123123
124124// if there's not enough memory for the concatenated value, the string
125125// will be left unchanged (but this isn't signalled in any way)
@@ -151,33 +151,33 @@ class String
151151operator StringIfHelperType ()const {return buffer ? &String::StringIfHelper :0 ; }
152152int compareTo (const String &s)const ;
153153int compareTo (const char *cstr)const ;
154- unsigned char equals (const String &s)const ;
155- unsigned char equals (const char *cstr)const ;
156-
157- friend unsigned char operator == (const String &a,const String &b) {return a.equals (b); }
158- friend unsigned char operator == (const String &a,const char *b) {return a.equals (b); }
159- friend unsigned char operator == (const char *a,const String &b) {return b == a; }
160- friend unsigned char operator < (const String &a,const String &b) {return a.compareTo (b) <0 ; }
161- friend unsigned char operator < (const String &a,const char *b) {return a.compareTo (b) <0 ; }
162- friend unsigned char operator < (const char *a,const String &b) {return b.compareTo (a) >0 ; }
163-
164- friend unsigned char operator != (const String &a,const String &b) {return !(a == b); }
165- friend unsigned char operator != (const String &a,const char *b) {return !(a == b); }
166- friend unsigned char operator != (const char *a,const String &b) {return !(a == b); }
167- friend unsigned char operator > (const String &a,const String &b) {return b < a; }
168- friend unsigned char operator > (const String &a,const char *b) {return b < a; }
169- friend unsigned char operator > (const char *a,const String &b) {return b < a; }
170- friend unsigned char operator <= (const String &a,const String &b) {return !(b < a); }
171- friend unsigned char operator <= (const String &a,const char *b) {return !(b < a); }
172- friend unsigned char operator <= (const char *a,const String &b) {return !(b < a); }
173- friend unsigned char operator >= (const String &a,const String &b) {return !(a < b); }
174- friend unsigned char operator >= (const String &a,const char *b) {return !(a < b); }
175- friend unsigned char operator >= (const char *a,const String &b) {return !(a < b); }
176-
177- unsigned char equalsIgnoreCase (const String &s)const ;
178- unsigned char startsWith (const String &prefix)const ;
179- unsigned char startsWith (const String &prefix,unsigned int offset)const ;
180- unsigned char endsWith (const String &suffix)const ;
154+ bool equals (const String &s)const ;
155+ bool equals (const char *cstr)const ;
156+
157+ friend bool operator == (const String &a,const String &b) {return a.equals (b); }
158+ friend bool operator == (const String &a,const char *b) {return a.equals (b); }
159+ friend bool operator == (const char *a,const String &b) {return b == a; }
160+ friend bool operator < (const String &a,const String &b) {return a.compareTo (b) <0 ; }
161+ friend bool operator < (const String &a,const char *b) {return a.compareTo (b) <0 ; }
162+ friend bool operator < (const char *a,const String &b) {return b.compareTo (a) >0 ; }
163+
164+ friend bool operator != (const String &a,const String &b) {return !(a == b); }
165+ friend bool operator != (const String &a,const char *b) {return !(a == b); }
166+ friend bool operator != (const char *a,const String &b) {return !(a == b); }
167+ friend bool operator > (const String &a,const String &b) {return b < a; }
168+ friend bool operator > (const String &a,const char *b) {return b < a; }
169+ friend bool operator > (const char *a,const String &b) {return b < a; }
170+ friend bool operator <= (const String &a,const String &b) {return !(b < a); }
171+ friend bool operator <= (const String &a,const char *b) {return !(b < a); }
172+ friend bool operator <= (const char *a,const String &b) {return !(b < a); }
173+ friend bool operator >= (const String &a,const String &b) {return !(a < b); }
174+ friend bool operator >= (const String &a,const char *b) {return !(a < b); }
175+ friend bool operator >= (const char *a,const String &b) {return !(a < b); }
176+
177+ bool equalsIgnoreCase (const String &s)const ;
178+ bool startsWith (const String &prefix)const ;
179+ bool startsWith (const String &prefix,unsigned int offset)const ;
180+ bool endsWith (const String &suffix)const ;
181181
182182// character acccess
183183char charAt (unsigned int index)const ;
@@ -226,7 +226,7 @@ class String
226226protected:
227227void init (void );
228228void invalidate (void );
229- unsigned char changeBuffer (unsigned int maxStrLen);
229+ bool changeBuffer (unsigned int maxStrLen);
230230
231231// copy and move
232232String © (const char *cstr,unsigned int length);