| 95 | } |
| 96 | |
| 97 | static inline std::string trim(std::string s) |
| 98 | { |
| 99 | // trim right |
| 100 | s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { return !is_whitespace(ch); }).base(), s.end()); |
| 101 | // trim left |
| 102 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !is_whitespace(ch); })); |
| 103 | return s; |
| 104 | } |
| 105 | |
| 106 | static size_t write_header(char* ptr, size_t size, size_t nmemb, void* userdata) |
| 107 | { |
no test coverage detected