base 从其 reverse_iterator还原基础迭代器,因为 earse 参数只能是基础迭代器
| 51 | |
| 52 | // base 从其 reverse_iterator还原基础迭代器,因为 earse 参数只能是基础迭代器 |
| 53 | void trimRightTrailingSpaces(string &input) { |
| 54 | input.erase(find_if(input.rbegin(), input.rend(), [](int ch) { |
| 55 | return !isspace(ch); |
| 56 | }).base(), input.end()); |
| 57 | } |
| 58 | |
| 59 | // 字符串输入转 vector:[1,2,3,4,5] |
| 60 | vector<int> stringToIntegerVector(string input) { |
no outgoing calls
no test coverage detected