| 45 | } |
| 46 | |
| 47 | bool LastIsSpace(const std::string& text) { |
| 48 | if (text.empty()) { |
| 49 | return false; |
| 50 | } |
| 51 | char last = text.back(); |
| 52 | return last == ' ' || last == '\n' || last == '\t' || last == '\r' || last == '\v' || |
| 53 | last == '\f'; |
| 54 | } |
| 55 | |
| 56 | std::string DeleteLastSpace(const std::string& text) { |
| 57 | std::string result = text; |
no test coverage detected