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

◆ substring()

template<size_t SIZE = 64>
StrN fl::StrN< SIZE >::substring ( size_t start,
size_t end ) const
inline

Definition at line 352 of file str.h.

352 {
353 if (start >= mLength) {
354 return StrN();
355 }
356 if (end > mLength) {
357 end = mLength;
358 }
359 if (start >= end) {
360 return StrN();
361 }
362 StrN out;
363 out.copy(c_str() + start, end - start);
364 return out;
365 }
size_t mLength
Definition str.h:108
const char * c_str() const
Definition str.h:272
void copy(const char *str)
Definition str.h:129
StrN()=default

References StrN(), c_str(), copy(), and mLength.

Referenced by trim().

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