* Check whether the given string starts with the given prefix, ignoring case. * @param str The string to look at. * @param prefix The prefix to look for. * @return True iff the begin of the string is the same as the prefix, ignoring case. */
| 255 | * @return True iff the begin of the string is the same as the prefix, ignoring case. |
| 256 | */ |
| 257 | bool StrStartsWithIgnoreCase(std::string_view str, std::string_view prefix) |
| 258 | { |
| 259 | if (str.size() < prefix.size()) return false; |
| 260 | return StrEqualsIgnoreCase(str.substr(0, prefix.size()), prefix); |
| 261 | } |
| 262 | |
| 263 | /** Case insensitive implementation of the standard character type traits. */ |
| 264 | struct CaseInsensitiveCharTraits : public std::char_traits<char> { |
no test coverage detected