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

Method starts_with

extern/re2/re2/stringpiece.h:150–153  ·  view source on GitHub ↗

Does "this" start with "x"?

Source from the content-addressed store, hash-verified

148
149 // Does "this" start with "x"?
150 bool starts_with(const StringPiece& x) const {
151 return x.empty() ||
152 (size() >= x.size() && memcmp(data(), x.data(), x.size()) == 0);
153 }
154
155 // Does "this" end with "x"?
156 bool ends_with(const StringPiece& x) const {

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