MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / ends_with

Method ends_with

extern/re2/re2/stringpiece.h:156–160  ·  view source on GitHub ↗

Does "this" end with "x"?

Source from the content-addressed store, hash-verified

154
155 // Does "this" end with "x"?
156 bool ends_with(const StringPiece& x) const {
157 return x.empty() ||
158 (size() >= x.size() &&
159 memcmp(data() + (size() - x.size()), x.data(), x.size()) == 0);
160 }
161
162 bool contains(const StringPiece& s) const {
163 return find(s) != npos;

Callers

nothing calls this directly

Calls 5

sizeFunction · 0.50
dataFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected