------------------------------------------------------------------------------
| 403 | |
| 404 | //------------------------------------------------------------------------------ |
| 405 | static std::string SimplifyWhitespace(const std::string& s) |
| 406 | { |
| 407 | int headIndx = 0; |
| 408 | int tailIndx = int(s.length()) - 1; |
| 409 | |
| 410 | while (headIndx < tailIndx && (s[headIndx] == ' ' || s[headIndx] == '\t')) |
| 411 | { |
| 412 | headIndx++; |
| 413 | } |
| 414 | |
| 415 | while (tailIndx > headIndx && (s[tailIndx] == ' ' || s[tailIndx] == '\t')) |
| 416 | { |
| 417 | tailIndx--; |
| 418 | } |
| 419 | |
| 420 | return s.substr(headIndx, tailIndx - headIndx + 1); |
| 421 | } |
| 422 | |
| 423 | //------------------------------------------------------------------------------ |
| 424 | // Supporting Functions ( end ) |
no test coverage detected