MCPcopy
hub / github.com/dosco/graphjin / contains

Function contains

core/openapi/classifier_test.go:491–493  ·  view source on GitHub ↗

contains is a tiny stand-in for strings.Contains kept local so the classifier_test file doesn't drag in extra imports for one call site.

(s, sub string)

Source from the content-addressed store, hash-verified

489// contains is a tiny stand-in for strings.Contains kept local so the
490// classifier_test file doesn't drag in extra imports for one call site.
491func contains(s, sub string) bool {
492 return len(sub) <= len(s) && (sub == "" || indexOf(s, sub) >= 0)
493}
494func indexOf(s, sub string) int {
495 for i := 0; i+len(sub) <= len(s); i++ {
496 if s[i:i+len(sub)] == sub {

Callers 5

TestCallerRowJoinPathFunction · 0.70
TestClassifySkipReasonsFunction · 0.70

Calls 1

indexOfFunction · 0.85

Tested by

no test coverage detected