MCPcopy Create free account
hub / github.com/approvals/ApprovalTests.cpp / endsWith

Method endsWith

ApprovalTests/utilities/StringUtils.cpp:49–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47 }
48
49 APPROVAL_TESTS_NO_DISCARD
50 bool StringUtils::endsWith(std::string value, std::string ending)
51 {
52 if (value.size() < ending.size())
53 {
54 return false;
55 }
56 return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
57 }
58
59 APPROVAL_TESTS_NO_DISCARD
60 std::string StringUtils::leftTrim(std::string s)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected