| 242 | } |
| 243 | |
| 244 | std::string_view StripWhitespace(const std::string_view str) |
| 245 | { |
| 246 | std::string_view::size_type start = 0; |
| 247 | while (start < str.size() && std::isspace(str[start])) |
| 248 | start++; |
| 249 | if (start == str.size()) |
| 250 | return {}; |
| 251 | |
| 252 | std::string_view::size_type end = str.size() - 1; |
| 253 | while (end > start && std::isspace(str[end])) |
| 254 | end--; |
| 255 | |
| 256 | return str.substr(start, end - start + 1); |
| 257 | } |
| 258 | |
| 259 | void StripWhitespace(std::string* str) |
| 260 | { |
no test coverage detected