MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / getLastPathSegment

Function getLastPathSegment

TactilityCore/Source/file/File.cpp:247–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247std::string getLastPathSegment(const std::string& path) {
248 auto index = path.find_last_of('/');
249 if (index != std::string::npos) {
250 return path.substr(index + 1);
251 } else {
252 return path;
253 }
254}
255
256std::string getFirstPathSegment(const std::string& path) {
257 if (path.empty()) {

Callers 9

handleFsDownloadMethod · 0.50
handleApiAppsInstallMethod · 0.50
installFunction · 0.50
onEjectPressedMethod · 0.50
onResultMethod · 0.50
onPastePressedMethod · 0.50
doPasteMethod · 0.50
doInstallMethod · 0.50
onShowMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected