Helper: Trim whitespace from string
| 22 | |
| 23 | // Helper: Trim whitespace from string |
| 24 | fl::string http_parser_trim(const fl::string& str) { |
| 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 | } |
| 39 | |
| 40 | // Helper: Parse integer from string |
| 41 | bool parseInt(const fl::string& str, int& out) { |
no test coverage detected