| 136 | } |
| 137 | |
| 138 | bool StartWith(const std::string& s, const std::string& pattern) { |
| 139 | if (s.size() < pattern.size()) { |
| 140 | return false; |
| 141 | } |
| 142 | for (size_t i = 0; i < pattern.size(); ++i) { |
| 143 | if (s[i] != pattern[i]) { |
| 144 | return false; |
| 145 | } |
| 146 | } |
| 147 | return true; |
| 148 | } |
| 149 | |
| 150 | bool EndWith(const std::string& s, const std::string& pattern) { |
| 151 | if (s.size() < pattern.size()) { |
no test coverage detected