MCPcopy Create free account
hub / github.com/FastLED/FastLED / trim

Function trim

src/fl/stl/asio/http/server.cpp.hpp:88–94  ·  view source on GitHub ↗

Helper: Trim whitespace from string

Source from the content-addressed store, hash-verified

86
87// Helper: Trim whitespace from string
88string trim(const string& s) {
89 size_t start = 0;
90 while (start < s.size() && fl::isspace(s[start])) ++start;
91 size_t end = s.size();
92 while (end > start && fl::isspace(s[end - 1])) --end;
93 return s.substr(start, end - start);
94}
95
96// Helper: Split string by delimiter
97vector<string> split(const string& s, char delimiter) {

Callers 1

read_requestMethod · 0.85

Calls 3

isspaceFunction · 0.85
sizeMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected