| 245 | } |
| 246 | |
| 247 | std::string getLastPathSegment(const std::string& path) { |
| 248 | auto index = path.find_last_of('/'); |
| 249 | if (index != std::string::npos) { |
| 250 | return path.substr(index + 1); |
| 251 | } else { |
| 252 | return path; |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | std::string getFirstPathSegment(const std::string& path) { |
| 257 | if (path.empty()) { |
no outgoing calls
no test coverage detected