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

Method EndsWithCaseInsensitive

tests/gtest/gtest-all.cc:3441–3448  ·  view source on GitHub ↗

Returns true iff str ends with the given suffix, ignoring case. Any string is considered to end with an empty suffix.

Source from the content-addressed store, hash-verified

3439// Returns true iff str ends with the given suffix, ignoring case.
3440// Any string is considered to end with an empty suffix.
3441bool String::EndsWithCaseInsensitive(
3442 const std::string& str, const std::string& suffix) {
3443 const size_t str_len = str.length();
3444 const size_t suffix_len = suffix.length();
3445 return (str_len >= suffix_len) &&
3446 CaseInsensitiveCStringEquals(str.c_str() + str_len - suffix_len,
3447 suffix.c_str());
3448}
3449
3450// Formats an int value as "%02d".
3451std::string String::FormatIntWidth2(int value) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected