| 149 | |
| 150 | |
| 151 | bool endsWith(const std::string& str, const std::string& suffix) { |
| 152 | if (str.size() < suffix.size()) |
| 153 | return false; |
| 154 | return std::equal(suffix.begin(), suffix.end(), str.end() - suffix.size()); |
| 155 | } |
| 156 | |
| 157 | |
| 158 | Location positionToLocation(const std::string& s, size_t pos) { |
no test coverage detected