| 22 | } |
| 23 | |
| 24 | std::pair<StringPiece, StringPiece> SplitBasename(StringPiece path) { |
| 25 | path = io::Basename(path); |
| 26 | auto pos = path.rfind('.'); |
| 27 | if (pos == StringPiece::npos) |
| 28 | return std::make_pair(path, StringPiece(path.data() + path.size(), 0)); |
| 29 | return std::make_pair( |
| 30 | StringPiece(path.data(), pos), |
| 31 | StringPiece(path.data() + pos + 1, path.size() - (pos + 1))); |
| 32 | } |
| 33 | |
| 34 | std::string ParseCkptFileName(const std::string& ckpt_dir, |
| 35 | const std::string& fname) { |
no test coverage detected