| 158 | |
| 159 | template <typename StringType> |
| 160 | void DoRemoveLineEnding(StringType* line) |
| 161 | { |
| 162 | while (!line->empty()) |
| 163 | { |
| 164 | char last = (*line)[line->length() - 1]; |
| 165 | if (last == '\r' || last == '\n') |
| 166 | line->resize(line->length() - 1); |
| 167 | else |
| 168 | break; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | void RemoveLineEnding(std::string* line) |
| 173 | { |
no test coverage detected