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.
| 3064 | // NULL C string is considered different to any non-NULL C string, |
| 3065 | // including the empty string. |
| 3066 | bool String::CaseInsensitiveCStringEquals(const char * lhs, const char * rhs) { |
| 3067 | if (lhs == NULL) |
| 3068 | return rhs == NULL; |
| 3069 | if (rhs == NULL) |
| 3070 | return false; |
| 3071 | return posix::StrCaseCmp(lhs, rhs) == 0; |
| 3072 | } |
| 3073 | |
| 3074 | // Compares two wide C strings, ignoring case. Returns true iff they |
| 3075 | // have the same content. |
nothing calls this directly
no test coverage detected