| 693 | } |
| 694 | |
| 695 | std::string trim(const std::string& in) { |
| 696 | if (in.empty()) return ""; |
| 697 | size_t i = 0; |
| 698 | while (i < in.length() && (in[i] == ' ' || in[i] == '\n' || in[i] == '\t' || in[i] == '\r' || in[i] == '\f' || in[i] == '\v')) i++; |
| 699 | size_t j = in.length() - 1; |
| 700 | while (j > 0 && (in[j] == ' ' || in[j] == '\n' || in[j] == '\t' || in[i] == '\r' || in[i] == '\f' || in[i] == '\v')) j--; |
| 701 | if (j - i + 1 > 0) { |
| 702 | return in.substr(i, j - i + 1); |
| 703 | } else { |
| 704 | return ""; |
| 705 | } |
| 706 | } |
| 707 | #endif |
| 708 | |
| 709 | /// <summary> |
nothing calls this directly
no outgoing calls
no test coverage detected