* Check whether the given string ends with the given suffix, ignoring case. * @param str The string to look at. * @param suffix The suffix to look for. * @return True iff the end of the string is the same as the suffix, ignoring case. */
| 295 | * @return True iff the end of the string is the same as the suffix, ignoring case. |
| 296 | */ |
| 297 | bool StrEndsWithIgnoreCase(std::string_view str, std::string_view suffix) |
| 298 | { |
| 299 | if (str.size() < suffix.size()) return false; |
| 300 | return StrEqualsIgnoreCase(str.substr(str.size() - suffix.size()), suffix); |
| 301 | } |
| 302 | |
| 303 | /** |
| 304 | * Compares two string( view)s, while ignoring the case of the characters. |
no test coverage detected