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

Function GetParentDirectory

src/benchmark/Performance.cpp:138–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138std::string GetParentDirectory(const std::string& path) {
139 const std::string::size_type pos = path.find_last_of("/\\");
140 if (pos == std::string::npos) {
141 return "";
142 }
143 return path.substr(0, pos + 1);
144}
145
146std::string ResolveConfigPath(const std::string& config_name) {
147#ifdef OPENCC_BENCHMARK_JIEBA_CONFIG_DIR

Callers 2

CreateMethod · 0.70

Calls 1

substrMethod · 0.45

Tested by

no test coverage detected