FastLED 3.10.8
Loading...
Searching...
No Matches

◆ StringHolder() [1/4]

fl::StringHolder::StringHolder ( const char * str)

Definition at line 24 of file string_holder.cpp.hpp.

25 : mData((char*)fl::malloc(strlen(str) + 1))
26 , mLength(strlen(str))
27 , mCapacity(mLength + 1) {
28 if (mData == nullptr) {
29 mLength = 0;
30 mCapacity = 0;
31 return;
32 }
34 mData[mLength] = '\0';
35}
FASTLED_FORCE_INLINE void * malloc(size_t size) FL_NO_EXCEPT
Definition malloc.h:21
FASTLED_FORCE_INLINE void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT
Definition cstring.h:136
FASTLED_FORCE_INLINE size_t strlen(const char *s) FL_NO_EXCEPT
Definition cstring.h:56

References fl::FL_NO_EXCEPT, fl::malloc(), mCapacity, mData, fl::memcpy(), and mLength.

Referenced by StringHolder(), and operator=().

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