| 43 | } |
| 44 | |
| 45 | inline string GetFileName(const string& filepath) { |
| 46 | std::size_t slash_before_file = filepath.rfind('/'); |
| 47 | if (slash_before_file == string::npos) return filepath; |
| 48 | return filepath.substr(slash_before_file + 1); |
| 49 | } |
| 50 | |
| 51 | inline bool StrStartsWith(const string& str, const string& prefix) { |
| 52 | return str.rfind(prefix, 0) == 0; |
no test coverage detected