@@ -202,8 +202,20 @@ class String {
202
202
unsigned char equalsIgnoreCase (const String &s) const ;
203
203
unsigned char equalsConstantTime (const String &s) const ;
204
204
unsigned char startsWith (const String &prefix) const ;
205
+ unsigned char startsWith (const char * prefix) const {
206
+ return this ->startsWith (String (prefix));
207
+ }
208
+ unsigned char startsWith (const __FlashStringHelper * prefix) const {
209
+ return this ->startsWith (String (prefix));
210
+ }
205
211
unsigned char startsWith (const String &prefix, unsigned int offset) const ;
206
212
unsigned char endsWith (const String &suffix) const ;
213
+ unsigned char endsWith (const char * suffix) const {
214
+ return this ->endsWith (String (suffix));
215
+ }
216
+ unsigned char endsWith (const __FlashStringHelper * suffix) const {
217
+ return this ->endsWith (String (suffix));
218
+ }
207
219
208
220
// character access
209
221
char charAt (unsigned int index) const ;
@@ -238,6 +250,21 @@ class String {
238
250
// modification
239
251
void replace (char find, char replace);
240
252
void replace (const String& find, const String& replace);
253
+ void replace (const char * find, const String& replace) {
254
+ this ->replace (String (find), replace);
255
+ }
256
+ void replace (const __FlashStringHelper * find, const String& replace) {
257
+ this ->replace (String (find), replace);
258
+ }
259
+ void replace (const char * find, const char * replace) {
260
+ this ->replace (String (find), String (replace));
261
+ }
262
+ void replace (const __FlashStringHelper * find, const char * replace) {
263
+ this ->replace (String (find), String (replace));
264
+ }
265
+ void replace (const __FlashStringHelper * find, const __FlashStringHelper * replace) {
266
+ this ->replace (String (find), String (replace));
267
+ }
241
268
void remove (unsigned int index);
242
269
void remove (unsigned int index, unsigned int count);
243
270
void toLowerCase (void );
0 commit comments