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 118 of file str.h.

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

References mHeapData, mInlineData, and mLength.