FastLED 3.10.6
Loading...
Searching...
No Matches

◆ substring()

string fl::string::substring ( fl::size start,
fl::size end ) const

Definition at line 151 of file string.cpp.hpp.

151 {
152 if (start == 0 && end == size()) return *this;
153 if (start >= size()) return string();
154 if (end > size()) end = size();
155 if (start >= end) return string();
156 string out;
157 out.copy(c_str() + start, end - start);
158 return out;
159}
iterator end() FL_NO_EXCEPT
const char * c_str() const FL_NO_EXCEPT
fl::size size() const FL_NO_EXCEPT
string() FL_NO_EXCEPT

References string(), fl::basic_string::c_str(), copy(), fl::basic_string::end(), fl::FL_NO_EXCEPT, and fl::basic_string::size().

Referenced by substr(), substr(), and trim().

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