| 75 | } |
| 76 | |
| 77 | static int get_lastpathsep(const rdcstr &path) |
| 78 | { |
| 79 | if(path.empty()) |
| 80 | return -1; |
| 81 | |
| 82 | size_t offs = path.size() - 1; |
| 83 | |
| 84 | while(offs > 0 && !ispathsep(path[offs])) |
| 85 | offs--; |
| 86 | |
| 87 | if(offs == 0 && !ispathsep(path[0])) |
| 88 | return -1; |
| 89 | |
| 90 | return (int)offs; |
| 91 | } |
| 92 | |
| 93 | rdcstr get_basename(const rdcstr &path) |
| 94 | { |
no test coverage detected