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

◆ StrN() [3/5]

template<size_t SIZE = 64>
fl::StrN< SIZE >::StrN ( const char * str)
inline

Definition at line 119 of file str.h.

119 {
120 size_t len = strlen(str);
121 mLength = len; // Length is without null terminator
122 if (len + 1 <= SIZE) { // Check capacity including null
123 memcpy(mInlineData, str, len + 1); // Copy including null
124 mHeapData.reset();
125 } else {
127 }
128 }
size_t mLength
Definition str.h:109
StringHolderPtr mHeapData
Definition str.h:111
char mInlineData[SIZE]
Definition str.h:110

References mHeapData, mInlineData, and mLength.