MCPcopy Create free account
hub / github.com/ColinPitrat/caprice32 / splitPath

Function splitPath

src/stringutils.cpp:46–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 void splitPath(const std::string& path, std::string& dirname, std::string& filename)
47 {
48 auto delimiter = path.rfind("/");
49 if(delimiter == path.npos) {
50 delimiter = path.rfind("\\");
51 }
52 if(delimiter != path.npos) {
53 delimiter++;
54 dirname = path.substr(0, delimiter);
55 filename = path.substr(delimiter);
56 } else {
57 dirname = "./";
58 filename = path;
59 }
60 }
61
62 bool caseInsensitiveCompare(const std::string& str1, const std::string& str2)
63 {

Callers 2

TESTFunction · 0.85
usageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected