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

Function IsCharInString

base/string/algorithm.h:31–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31inline bool IsCharInString(char c, const StringPiece& str)
32{
33 size_t len = str.size();
34 for (size_t i = 0; i < len; i++)
35 {
36 if (str[i] == c) return true;
37 }
38 return false;
39}
40
41inline bool StringStartsWith(const StringPiece& str, const StringPiece& prefix)
42{

Callers 1

TESTFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68