20 #ifndef UTILS_STRINGS_GET_PATH_H
21 #define UTILS_STRINGS_GET_PATH_H
34 std::string
GetPath(
const std::string &path) {
37 return std::string(
"");
40 if (path.back() ==
'/')
43 std::vector<std::string> path_tokens;
48 if (path_tokens.size() == 0)
49 return path[0] ==
'/' ? std::string(
"/") : std::string(
"");
52 path_tokens.erase(path_tokens.end());
std::string GetPath(const std::string &path)
std::string PrependSlash(const std::string &string)
std::string JoinFilepath(const std::vector< std::string > &path_tokens)
void TokenizeFileString(const std::string &string, std::vector< std::string > *tokens)