mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-01 03:26:58 +03:00
Create empty method for String class (#6293)
* Created empty method * Changed method name from "empty" to "isEmpty". Created a new method to empty a string * Changed method name from "empty" to "clear".
This commit is contained in:
@ -82,6 +82,12 @@ class String {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
inline void clear(void) {
|
||||
setLen(0);
|
||||
}
|
||||
inline bool isEmpty(void) const {
|
||||
return length() == 0;
|
||||
}
|
||||
|
||||
// creates a copy of the assigned value. if the value is null or
|
||||
// invalid, or if the memory allocation fails, the string will be
|
||||
|
Reference in New Issue
Block a user