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