You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.In brief: in the String class of the WString.cpp library, the following method responses access string comparison functions (strcmp() and strcnmp()) that are not ESP8266-safe:
bool String::endsWith(const String &s2) const;
bool String::equals(const char *cstr) const;
int String::compareTo(const String &s) const;
bool String::startsWith(const String &s2, unsigned int offset) const.
2.Problem description: because the listed methods use functions that cannot work with strings in external ROM, an exception (3) occurs when working with the specified methods for strings declared as F() or PSTR().
3.An example that will result in exception (3): if(someString.equals(PSTR("eqString")) {// todo something} >>> exception (3): in console log.
4.Solution: replace strcmp() with strcmp_P(), strcnmp() with strcnmp_P().