MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / contain

Method contain

core/src/utils/cefstr.cc:27–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27bool CefStrBase::contain(const char *sub) const
28{
29 if (empty()) return false;
30 size_t sub_len = strlen(sub);
31
32 for (size_t i = 0; i <= length - sub_len; ++i) {
33 bool match = true;
34 for (size_t j = 0; j < sub_len; ++j) {
35 if (str[i + j] != sub[j]) {
36 match = false;
37 break;
38 }
39 }
40 if (match)
41 return true;
42 }
43
44 return false;
45}
46
47bool CefStrBase::startw(const char *sub) const
48{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected