| 99 | } |
| 100 | |
| 101 | std::pair<std::string, std::string> GetAbstractPathParent(const std::string& s) { |
| 102 | // XXX should strip trailing slash? |
| 103 | |
| 104 | auto pos = s.find_last_of(kSep); |
| 105 | if (pos == std::string::npos) { |
| 106 | // Empty parent |
| 107 | return {{}, s}; |
| 108 | } |
| 109 | return {s.substr(0, pos), s.substr(pos + 1)}; |
| 110 | } |
| 111 | |
| 112 | std::string GetAbstractPathExtension(const std::string& s) { |
| 113 | std::string_view basename(s); |