| 131 | } |
| 132 | |
| 133 | rdcstr strip_extension(const rdcstr &path) |
| 134 | { |
| 135 | if(path.empty()) |
| 136 | return path; |
| 137 | |
| 138 | size_t offs = path.size() - 1; |
| 139 | |
| 140 | while(offs > 0 && path[offs] != '.') |
| 141 | offs--; |
| 142 | |
| 143 | if(offs == 0 && path[offs] != '.') |
| 144 | return path; |
| 145 | |
| 146 | return path.substr(0, offs); |
| 147 | } |
| 148 | |
| 149 | rdcstr standardise_directory_separator(const rdcstr &path) |
| 150 | { |
no test coverage detected