MCPcopy Create free account
hub / github.com/baldurk/renderdoc / get_basename

Function get_basename

renderdoc/strings/string_utils.cpp:93–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93rdcstr get_basename(const rdcstr &path)
94{
95 rdcstr base = path;
96
97 while(!base.empty() && ispathsep(base.back()))
98 base.pop_back();
99
100 if(base.empty())
101 return base;
102
103 int offset = get_lastpathsep(base);
104
105 if(offset == -1)
106 return base;
107
108 return base.substr(offset + 1);
109}
110
111rdcstr get_dirname(const rdcstr &path)
112{

Callers 15

string_utils.cppFile · 0.85
intercept_dlopenFunction · 0.85
interposed_dlopenFunction · 0.85
RegisterLibraryHookMethod · 0.85
intercept_dlopenFunction · 0.85
add_hooksFunction · 0.85
LookupModuleFunction · 0.85
GetAddrMethod · 0.85
ImageViewerMethod · 0.85

Calls 6

ispathsepFunction · 0.85
get_lastpathsepFunction · 0.85
emptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected