FastLED 3.9.15
Loading...
Searching...
No Matches

◆ clear()

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

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

490 {
491 mLength = 0;
492 if (isNonOwning() || (freeMemory && hasHeapData())) {
493 mStorage.reset();
494 inlineBufferPtr()[0] = '\0';
495 } else {
496 c_str_mutable()[0] = '\0';
497 }
498}
bool isNonOwning() const FL_NOEXCEPT
bool hasHeapData() const FL_NOEXCEPT
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage
char * c_str_mutable() FL_NOEXCEPT
char * inlineBufferPtr() FL_NOEXCEPT

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: