| 130 | // Join the components of an abstract path. |
| 131 | template <class StringIt> |
| 132 | std::string JoinAbstractPath(StringIt it, StringIt end, char sep = kSep) { |
| 133 | std::string path; |
| 134 | for (; it != end; ++it) { |
| 135 | if (it->empty()) continue; |
| 136 | |
| 137 | if (!path.empty()) { |
| 138 | path += sep; |
| 139 | } |
| 140 | path += *it; |
| 141 | } |
| 142 | return path; |
| 143 | } |
| 144 | |
| 145 | template <class StringRange> |
| 146 | std::string JoinAbstractPath(const StringRange& range, char sep = kSep) { |