| 21 | }; |
| 22 | |
| 23 | static std::string Strip(std::string s) { |
| 24 | size_t b = 0; |
| 25 | size_t e = s.size(); |
| 26 | while (b < e && std::isspace(s[b])) { |
| 27 | ++b; |
| 28 | } |
| 29 | while (b < e && std::isspace(s[e - 1])) { |
| 30 | --e; |
| 31 | } |
| 32 | return s.substr(b, e - b); |
| 33 | } |
| 34 | |
| 35 | // Extacts the next code block from stream f. |
| 36 | // Returns true if found. |
no test coverage detected