Compares two C strings, ignoring case. Returns true iff they have the same content. Unlike strcasecmp(), this function can handle NULL argument(s). A NULL C string is considered different to any non-NULL C string, including the empty string.
| 3397 | // NULL C string is considered different to any non-NULL C string, |
| 3398 | // including the empty string. |
| 3399 | bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) { |
| 3400 | if (lhs == nullptr) return rhs == nullptr; |
| 3401 | if (rhs == nullptr) return false; |
| 3402 | return posix::StrCaseCmp(lhs, rhs) == 0; |
| 3403 | } |
| 3404 | |
| 3405 | // Compares two wide C strings, ignoring case. Returns true iff they |
| 3406 | // have the same content. |
nothing calls this directly
no test coverage detected