MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getFileNameFromPath

Method getFileNameFromPath

source/io/fs.cpp:264–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264BString Fs::getFileNameFromPath(const BString& path) {
265 int pos = path.lastIndexOf('/');
266 if (pos==-1) {
267 return path;
268 }
269 return path.substr(pos+1);
270}
271
272BString Fs::getFileNameFromNativePath(const BString& path) {
273 int pos = path.lastIndexOf(Fs::nativePathSeperator);

Callers

nothing calls this directly

Calls 2

lastIndexOfMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected