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

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

References StrN(), c_str(), copy(), fl::end(), and mLength.

Referenced by trim().

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