FastLED 3.10.8
Loading...
Searching...
No Matches

◆ clear()

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

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

514 {
515 mLength = 0;
516 if (isNonOwning() || (freeMemory && hasHeapData())) {
517 mStorage.reset();
518 inlineBufferPtr()[0] = '\0';
519 } else {
520 c_str_mutable()[0] = '\0';
521 }
522}
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(), 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: