MCPcopy Create free account
hub / github.com/apache/brpc / startsWith

Function startsWith

test/brpc_controller_unittest.cpp:85–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 return memcmp(s1.data() + s1.size() - s2.size(), s2.data(), s2.size()) == 0;
84}
85static bool startsWith(const std::string& s1, const butil::StringPiece& s2) {
86 if (s1.size() < s2.size()) {
87 return false;
88 }
89 return memcmp(s1.data(), s2.data(), s2.size()) == 0;
90}
91
92DECLARE_bool(log_as_json);
93

Callers 1

TEST_FFunction · 0.85

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected