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

Function strip_extension

renderdoc/strings/string_utils.cpp:133–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133rdcstr strip_extension(const rdcstr &path)
134{
135 if(path.empty())
136 return path;
137
138 size_t offs = path.size() - 1;
139
140 while(offs > 0 && path[offs] != '.')
141 offs--;
142
143 if(offs == 0 && path[offs] != '.')
144 return path;
145
146 return path.substr(0, offs);
147}
148
149rdcstr standardise_directory_separator(const rdcstr &path)
150{

Callers 6

string_utils.cppFile · 0.85
LookupModuleFunction · 0.85
getToolPathFunction · 0.85
Buffers2ZIPFunction · 0.85
ZIP2BuffersFunction · 0.85
GetJSONPathFunction · 0.85

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
substrMethod · 0.45

Tested by

no test coverage detected