MCPcopy Create free account
hub / github.com/chen3feng/toft / GetExtension

Method GetExtension

storage/path/path.cpp:37–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37std::string Path::GetExtension(const std::string& filepath)
38{
39 size_t last_dot = filepath.rfind('.');
40 if (last_dot == std::string::npos)
41 return "";
42 return filepath.substr(last_dot);
43}
44
45std::string Path::GetDirectory(const std::string& filepath)
46{

Callers

nothing calls this directly

Calls 2

rfindMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected