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

◆ assign()

template<fl::size SIZE = FASTLED_STR_INLINED_SIZE>
void fl::StrN< SIZE >::assign ( const char * str,
fl::size len )
inline

Definition at line 198 of file str.h.

198 {
199 mLength = len;
200 if (len + 1 <= SIZE) {
201 memcpy(mInlineData, str, len + 1);
202 mHeapData.reset();
203 } else {
205 mHeapData->copy(str, len);
206 mHeapData->data()[len] = '\0';
207 }
208 }
StringHolderPtr mHeapData
Definition str.h:142
char mInlineData[SIZE]
Definition str.h:141
fl::size mLength
Definition str.h:140
shared_ptr< T > make_shared(Args &&... args)
Definition shared_ptr.h:348

References fl::make_shared(), mHeapData, mInlineData, and mLength.

Referenced by operator=().

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