| 56 | } |
| 57 | |
| 58 | string incrementName(const string& name) |
| 59 | { |
| 60 | size_t split = name.length(); |
| 61 | while (split > 0) |
| 62 | { |
| 63 | if (!isdigit(name[split - 1])) |
| 64 | break; |
| 65 | split--; |
| 66 | } |
| 67 | |
| 68 | if (split < name.length()) |
| 69 | { |
| 70 | string prefix = name.substr(0, split); |
| 71 | string suffix = name.substr(split, name.length()); |
| 72 | return prefix + std::to_string(std::stoi(suffix) + 1); |
| 73 | } |
| 74 | return name + "2"; |
| 75 | } |
| 76 | |
| 77 | StringVec splitString(const string& str, const string& sep) |
| 78 | { |
no test coverage detected