FastLED 3.10.8
Loading...
Searching...
No Matches

◆ http_parser_trim()

fl::string fl::anonymous_namespace{http_parser.cpp.hpp}::http_parser_trim ( const fl::string & str)

Definition at line 24 of file http_parser.cpp.hpp.

24 {
25 if (str.empty()) return str;
26
27 size_t start = 0;
28 while (start < str.size() && fl::isspace(str[start])) {
29 start++;
30 }
31
32 size_t end = str.size();
33 while (end > start && fl::isspace(str[end - 1])) {
34 end--;
35 }
36
37 return str.substr(start, end - start);
38}
bool empty() const FL_NO_EXCEPT
fl::size size() const FL_NO_EXCEPT
string substr(fl::size start, fl::size length) const FL_NO_EXCEPT
constexpr T * end(T(&array)[N]) FL_NO_EXCEPT
bool isspace(char c) FL_NO_EXCEPT
Check if character is whitespace (space, tab, newline, carriage return)
Definition cctype.h:18

References fl::adl_barrier::end(), fl::FL_NO_EXCEPT, http_parser_trim(), and fl::isspace().

Referenced by http_parser_trim().

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