MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / BaseName

Function BaseName

src/ResourceProvider.cpp:125–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125std::string BaseName(const std::string& path) {
126 const size_t pos = path.find_last_of('/');
127 if (pos == std::string::npos) {
128 return path;
129 }
130 return path.substr(pos + 1);
131}
132
133bool GetFileFreshnessCacheKey(const std::string& path, std::string* cacheKey) {
134#if defined(_WIN32) || defined(_WIN64)

Callers 1

GetResourceMethod · 0.70

Calls 1

substrMethod · 0.45

Tested by

no test coverage detected