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

Function get_dirname

renderdoc/strings/string_utils.cpp:111–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111rdcstr get_dirname(const rdcstr &path)
112{
113 rdcstr base = path;
114
115 while(!base.empty() && ispathsep(base.back()))
116 base.pop_back();
117
118 if(base.empty())
119 return ".";
120
121 int offset = get_lastpathsep(base);
122
123 if(offset == -1)
124 {
125 base.resize(1);
126 base[0] = '.';
127 return base;
128 }
129
130 return base.substr(0, offset);
131}
132
133rdcstr strip_extension(const rdcstr &path)
134{

Callers 15

string_utils.cppFile · 0.85
RunProcessFunction · 0.85
GetHookingEnvModsFunction · 0.85
CreateParentDirectoryFunction · 0.85
GetReplayAppFilenameFunction · 0.85
RunProcessFunction · 0.85
StartGlobalHookMethod · 0.85
CreateParentDirectoryFunction · 0.85
GetReplayAppFilenameFunction · 0.85
LocatePluginFileFunction · 0.85

Calls 7

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

Tested by

no test coverage detected