58 typedef void (
String::*StringIfHelperType)()
const;
59 void StringIfHelper()
const {}
61 static size_t const FLT_MAX_DECIMAL_PLACES = 10;
62 static size_t const DBL_MAX_DECIMAL_PLACES = FLT_MAX_DECIMAL_PLACES;
74 String(
const __FlashStringHelper *str);
77 explicit String(
unsigned char,
unsigned char base=10);
79 explicit String(
unsigned int,
unsigned char base=10);
81 explicit String(
unsigned long,
unsigned char base=10);
90 bool reserve(
unsigned int size);
91 inline unsigned int length(
void)
const {
return len;}
92 inline bool isEmpty(
void)
const {
return length() == 0; }
107 bool concat(
const String &str);
108 bool concat(
const char *
cstr);
109 bool concat(
const char *
cstr,
unsigned int length);
110 bool concat(
const uint8_t *
cstr,
unsigned int length) {
return concat((
const char*)
cstr, length);}
112 bool concat(
unsigned char num);
113 bool concat(
int num);
114 bool concat(
unsigned int num);
115 bool concat(
long num);
116 bool concat(
unsigned long num);
117 bool concat(
float num);
118 bool concat(
double num);
119 bool concat(
const __FlashStringHelper * str);
133 String &
operator += (
const __FlashStringHelper *str){concat(str);
return (*
this);}
148 operator StringIfHelperType()
const {
return buffer ? &String::StringIfHelper : 0; }
149 int compareTo(
const String &
s)
const;
150 int compareTo(
const char *
cstr)
const;
151 bool equals(
const String &
s)
const;
152 bool equals(
const char *
cstr)
const;
174 bool equalsIgnoreCase(
const String &
s)
const;
180 char charAt(
unsigned int index)
const;
181 void setCharAt(
unsigned int index,
char c);
184 void getBytes(
unsigned char *
buf,
unsigned int bufsize,
unsigned int index=0)
const;
185 void toCharArray(
char *
buf,
unsigned int bufsize,
unsigned int index=0)
const
186 { getBytes((
unsigned char *)
buf,
bufsize, index); }
187 const char* c_str()
const {
return buffer; }
188 char* begin() {
return buffer; }
189 char* end() {
return buffer + length(); }
190 const char* begin()
const {
return c_str(); }
191 const char* end()
const {
return c_str() + length(); }
194 int indexOf(
char ch )
const;
195 int indexOf(
char ch,
unsigned int fromIndex )
const;
196 int indexOf(
const String &str )
const;
198 int lastIndexOf(
char ch )
const;
199 int lastIndexOf(
char ch,
unsigned int fromIndex )
const;
200 int lastIndexOf(
const String &str )
const;
206 void replace(
char find,
char replace);
207 void replace(
const String& find,
const String& replace);
208 void remove(
unsigned int index);
209 void remove(
unsigned int index,
unsigned int count);
210 void toLowerCase(
void);
211 void toUpperCase(
void);
215 long toInt(
void)
const;
216 float toFloat(
void)
const;
217 double toDouble(
void)
const;
221 unsigned int capacity;
225 void invalidate(
void);
226 bool changeBuffer(
unsigned int maxStrLen);
229 String & copy(
const char *
cstr,
unsigned int length);
230 String & copy(
const __FlashStringHelper *
pstr,
unsigned int length);