FastLED 3.10.10
Loading...
Searching...
No Matches

◆ StringHolder() [1/4]

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

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

43 : mData((char*)fl::malloc(strlen(str) + 1))
44 , mLength(strlen(str))
45 , mCapacity(mLength + 1) {
46 if (mData == nullptr) {
47 mLength = 0;
48 mCapacity = 0;
49 return;
50 }
52 mData[mLength] = '\0';
53}
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: