MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / containsSubstring

Function containsSubstring

internal/tui/picker_test.go:968–970  ·  view source on GitHub ↗

containsSubstring is a simple substring check.

(s, substr string)

Source from the content-addressed store, hash-verified

966
967// containsSubstring is a simple substring check.
968func containsSubstring(s, substr string) bool {
969 return len(s) >= len(substr) && indexOf(s, substr) >= 0
970}
971
972func indexOf(s, substr string) int {
973 for i := 0; i <= len(s)-len(substr); i++ {

Calls 1

indexOfFunction · 0.85

Tested by

no test coverage detected