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

Function contains

internal/cmd/edit_test.go:113–115  ·  view source on GitHub ↗

Helper function to check if a string contains a substring

(s, substr string)

Source from the content-addressed store, hash-verified

111
112// Helper function to check if a string contains a substring
113func contains(s, substr string) bool {
114 return len(s) >= len(substr) && (s == substr || len(s) > 0 && containsHelper(s, substr))
115}
116
117func containsHelper(s, substr string) bool {
118 for i := 0; i <= len(s)-len(substr); i++ {

Callers 2

Calls 1

containsHelperFunction · 0.85

Tested by

no test coverage detected