| 212 | |
| 213 | |
| 214 | bool StringUtil::endsWith(const std::string& str, const std::string& suffix) { |
| 215 | if (str.length() < suffix.length()) { |
| 216 | return false; |
| 217 | } |
| 218 | |
| 219 | return str.compare( |
| 220 | str.length() - suffix.length(), |
| 221 | suffix.length(), |
| 222 | suffix) == 0; |
| 223 | } |
| 224 | |
| 225 | int StringUtil::compare( |
| 226 | const char* s1, |