MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / CaseInsensitiveCStringEquals

Method CaseInsensitiveCStringEquals

tests/gtest/gtest-all.cc:3399–3403  ·  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

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

Callers

nothing calls this directly

Calls 1

StrCaseCmpFunction · 0.85

Tested by

no test coverage detected