FastLED 3.10.9
Loading...
Searching...
No Matches

◆ clear()

void fl::basic_string::clear ( bool freeMemory = false)

Definition at line 539 of file basic_string.cpp.hpp.

539 {
540 mLength = 0;
541 if (isNonOwning() || (freeMemory && hasHeapData())) {
542 mStorage.reset();
543 inlineBufferPtr()[0] = '\0';
544 } else {
545 c_str_mutable()[0] = '\0';
546 }
547}
bool isNonOwning() const FL_NO_EXCEPT
char * c_str_mutable() FL_NO_EXCEPT
bool hasHeapData() const FL_NO_EXCEPT
char * inlineBufferPtr() FL_NO_EXCEPT
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage

References c_str_mutable(), fl::FL_NO_EXCEPT, hasHeapData(), inlineBufferPtr(), isNonOwning(), mLength, and mStorage.

Referenced by assign(), fl::formatJsonResponse(), and fl::anonymous_namespace{json.cpp.hpp}::JsonBuilder::push_value().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: