File tree 1 file changed +22
-2
lines changed
1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -212,18 +212,28 @@ class String : public Object<String, char>
212
212
return equals (str, true );
213
213
}
214
214
215
+ bool operator ==(const char * cstr) const
216
+ {
217
+ return equals (cstr);
218
+ }
219
+
220
+ bool operator !=(const char * cstr) const
221
+ {
222
+ return !equals (cstr);
223
+ }
224
+
215
225
/* * @brief Check for equality with another String
216
226
* @param str
217
227
* @retval bool true if strings are identical
218
228
*/
219
229
bool equals (const String& str, bool ignoreCase = false ) const ;
220
230
221
- template < typename T> bool operator ==(const T & str) const
231
+ bool operator ==(const String & str) const
222
232
{
223
233
return equals (str);
224
234
}
225
235
226
- template < typename T> bool operator !=(const T & str) const
236
+ bool operator !=(const String & str) const
227
237
{
228
238
return !equals (str);
229
239
}
@@ -234,6 +244,16 @@ class String : public Object<String, char>
234
244
235
245
bool equals (const WString& str, bool ignoreCase = false ) const ;
236
246
247
+ bool operator ==(const WString& str) const
248
+ {
249
+ return equals (str);
250
+ }
251
+
252
+ bool operator !=(const WString& str) const
253
+ {
254
+ return !equals (str);
255
+ }
256
+
237
257
/* Arduino Print support */
238
258
239
259
/* *
You can’t perform that action at this time.
0 commit comments