FastLED 3.10.6
Loading...
Searching...
No Matches

◆ constData()

const char * fl::basic_string::constData ( ) const
protected

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

151 {
152 if (isInline()) {
153 return inlineBufferPtr();
154 } else if (mStorage.is<NotNullStringHolderPtr>()) {
155 return mStorage.get<NotNullStringHolderPtr>()->data();
156 } else if (mStorage.is<ConstLiteral>()) {
157 return mStorage.get<ConstLiteral>().data;
158 } else if (mStorage.is<ConstView>()) {
159 return mStorage.get<ConstView>().data;
160 }
161 return "";
162}
char * inlineBufferPtr() FL_NO_EXCEPT
bool isInline() const FL_NO_EXCEPT
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage
const char * data() const FL_NO_EXCEPT
fl::not_null< StringHolderPtr > NotNullStringHolderPtr

References data(), inlineBufferPtr(), isInline(), and mStorage.

Referenced by fl::string::assign(), and c_str().

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