FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

◆ StrN() [3/5]

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

Definition at line 91 of file str.h.

91 {
92 size_t len = strlen(str);
93 mLength = len; // Length is without null terminator
94 if (len + 1 <= SIZE) { // Check capacity including null
95 memcpy(mInlineData, str, len + 1); // Copy including null
96 mHeapData.reset();
97 } else {
99 }
100 }
size_t mLength
Definition str.h:81
StringHolderPtr mHeapData
Definition str.h:83
char mInlineData[SIZE]
Definition str.h:82
Definition str.h:79

References mHeapData, mInlineData, and mLength.