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

Method CStringEquals

tests/gtest/gtest-all.cc:2398–2404  ·  view source on GitHub ↗

Compares two C strings. Returns true iff they have the same content. Unlike strcmp(), 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

2396// C string is considered different to any non-NULL C string,
2397// including the empty string.
2398bool String::CStringEquals(const char * lhs, const char * rhs) {
2399 if (lhs == nullptr) return rhs == nullptr;
2400
2401 if (rhs == nullptr) return false;
2402
2403 return strcmp(lhs, rhs) == 0;
2404}
2405
2406#if GTEST_HAS_STD_WSTRING
2407

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected