FastLED 3.10.6
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(), hasHeapData(), inlineBufferPtr(), isNonOwning(), mLength, and mStorage.

Referenced by assign(), assign(), assign(), fl::istream::getline(), fl::istream_real::getline(), fl::istream::operator>>(), fl::anonymous_namespace{json.cpp.hpp}::JsonBuilder::push_value(), and fl::istream_real::readToken().

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