MCPcopy Create free account
hub / github.com/SamNet-dev/snix / containsBytes

Function containsBytes

core/engine/engine_test.go:234–248  ·  view source on GitHub ↗
(hay, needle []byte)

Source from the content-addressed store, hash-verified

232}
233
234func containsBytes(hay, needle []byte) bool {
235 for i := 0; i+len(needle) <= len(hay); i++ {
236 match := true
237 for j := range needle {
238 if hay[i+j] != needle[j] {
239 match = false
240 break
241 }
242 }
243 if match {
244 return true
245 }
246 }
247 return false
248}

Calls

no outgoing calls

Tested by

no test coverage detected