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

◆ trim()

string fl::string::trim ( ) const

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

180 {
181 fl::size start = 0;
182 fl::size end_pos = size();
183 while (start < size() && fl::isspace(c_str()[start])) start++;
184 while (end_pos > start && fl::isspace(c_str()[end_pos - 1])) end_pos--;
185 return substring(start, end_pos);
186}
const char * c_str() const FL_NOEXCEPT
fl::size size() const FL_NOEXCEPT
string substring(fl::size start, fl::size end) const FL_NOEXCEPT
bool isspace(char c) FL_NOEXCEPT
Check if character is whitespace (space, tab, newline, carriage return)
Definition cctype.h:18

References fl::basic_string::c_str(), FL_NOEXCEPT, fl::isspace(), fl::basic_string::size(), and substring().

+ Here is the call graph for this function: