| 136 | } |
| 137 | |
| 138 | std::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 | |
| 146 | std::string ResolveConfigPath(const std::string& config_name) { |
| 147 | #ifdef OPENCC_BENCHMARK_JIEBA_CONFIG_DIR |
no test coverage detected