MCPcopy Create free account
hub / github.com/apache/singa / CaseInsensitiveCStringEquals

Method CaseInsensitiveCStringEquals

test/gtest/gtest-all.cc:3066–3072  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

3064// NULL C string is considered different to any non-NULL C string,
3065// including the empty string.
3066bool 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.

Callers

nothing calls this directly

Calls 1

StrCaseCmpFunction · 0.85

Tested by

no test coverage detected