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

Function CompareStringPieceWithoutCase

src/brpc/protocol.cpp:153–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151// ======================================================
152
153inline bool CompareStringPieceWithoutCase(
154 const butil::StringPiece& s1, const char* s2) {
155 if (strlen(s2) != s1.size()) {
156 return false;
157 }
158 return strncasecmp(s1.data(), s2, s1.size()) == 0;
159}
160
161ProtocolType StringToProtocolType(const butil::StringPiece& name,
162 bool print_log_on_unknown) {

Callers 1

StringToProtocolTypeFunction · 0.70

Calls 3

strncasecmpFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected