FastLED 3.9.15
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_NOEXCEPT
fl::size size() const FL_NOEXCEPT
string substr(fl::size start, fl::size length) const FL_NOEXCEPT
constexpr T * end(T(&array)[N]) 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::empty(), fl::end(), http_parser_trim(), fl::isspace(), fl::basic_string::size(), and fl::string::substr().

Referenced by http_parser_trim().

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