MCPcopy Create free account
hub / github.com/Tablecruncher/tablecruncher / getBasename

Method getBasename

src/helper.cpp:455–458  ·  view source on GitHub ↗

* Returns the filename of a path: e.g. "file.csv" from "/a/b/file.csv" */

Source from the content-addressed store, hash-verified

453 * Returns the filename of a path: e.g. "file.csv" from "/a/b/file.csv"
454 */
455std::string Helper::getBasename(const std::string& path) {
456 size_t found = path.find_last_of("/\\");
457 return(path.substr(found+1));
458}
459
460/*
461 * Returns the directory part of a path: e.g. "/a/b/" from "/a/b/file.csv"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected