MCPcopy Create free account
hub / github.com/chen3feng/toft / StringStartsWithIgnoreCase

Function StringStartsWithIgnoreCase

base/string/algorithm.cpp:18–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace toft {
17
18bool StringStartsWithIgnoreCase(const StringPiece& str, const StringPiece& prefix)
19{
20 return str.size() >= prefix.size() &&
21 memcasecmp(str.data(), prefix.data(), prefix.length()) == 0;
22}
23
24// Replace the first "old" pattern with the "new" pattern in a string
25std::string ReplaceFirst(

Callers 1

TESTFunction · 0.85

Calls 4

memcasecmpFunction · 0.85
dataMethod · 0.80
sizeMethod · 0.45
lengthMethod · 0.45

Tested by 1

TESTFunction · 0.68