Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions cores/esp8266/WString.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,33 @@ class String {
bool operator ==(const __FlashStringHelper *rhs) const {
return equals(rhs);
}
bool operator ==(std::nullptr_t) const {
return length() == 0;
}
bool operator ==(int num) const {
return equals(String(num));
}
bool operator ==(unsigned int num) const {
return equals(String(num));
}
bool operator ==(long num) const {
return equals(String(num));
}
bool operator ==(unsigned long num) const {
return equals(String(num));
}
bool operator ==(long long num) const {
return equals(String(num));
}
bool operator ==(unsigned long long num) const {
return equals(String(num));
}
bool operator ==(float num) const {
return equals(String(num));
}
bool operator ==(double num) const {
return equals(String(num));
}
bool operator !=(const String &rhs) const {
return !equals(rhs);
}
Expand All @@ -239,6 +266,33 @@ class String {
bool operator !=(const __FlashStringHelper *rhs) const {
return !equals(rhs);
}
bool operator !=(std::nullptr_t) const {
return length() != 0;
}
bool operator !=(int num) const {
return !equals(String(num));
}
bool operator !=(unsigned int num) const {
return !equals(String(num));
}
bool operator !=(long num) const {
return !equals(String(num));
}
bool operator !=(unsigned long num) const {
return !equals(String(num));
}
bool operator !=(long long num) const {
return !equals(String(num));
}
bool operator !=(unsigned long long num) const {
return !equals(String(num));
}
bool operator !=(float num) const {
return !equals(String(num));
}
bool operator !=(double num) const {
return !equals(String(num));
}
bool operator <(const String &rhs) const;
bool operator >(const String &rhs) const;
bool operator <=(const String &rhs) const;
Expand Down