MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / dirPath

Function dirPath

externals/simplecpp/simplecpp.cpp:2660–2667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2658}
2659
2660static std::string dirPath(const std::string& path, bool withTrailingSlash=true)
2661{
2662 const std::size_t lastSlash = path.find_last_of("\\/");
2663 if (lastSlash == std::string::npos) {
2664 return "";
2665 }
2666 return path.substr(0, lastSlash + (withTrailingSlash ? 1U : 0U));
2667}
2668
2669static std::string openHeader(std::ifstream &f, const simplecpp::DUI &dui, const std::string &sourcefile, const std::string &header, bool systemheader);
2670

Callers 2

openHeaderFunction · 0.85
getMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected