MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / makebasename

Function makebasename

tools/comdb2ar/util.cpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void makebasename(std::string& path)
41// Turn a pathname into just the base file name in place. If path doesn't
42// contain any /'s then it is unchanged.
43{
44 size_t pos = path.find_last_of('/');
45 if(pos != std::string::npos) {
46 path = path.substr(pos + 1);
47 }
48}
49
50void makedirname(std::string& path)
51// Strip a path down into just a directory name, by removing everything after

Callers 1

process_lrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected