MCPcopy Index your code
hub / github.com/coder/coder / hasPrefixFoldASCII

Function hasPrefixFoldASCII

agent/filefinder/text.go:234–244  ·  view source on GitHub ↗
(haystack, prefix []byte)

Source from the content-addressed store, hash-verified

232}
233
234func hasPrefixFoldASCII(haystack, prefix []byte) bool {
235 if len(prefix) > len(haystack) {
236 return false
237 }
238 for i := range prefix {
239 if toLowerASCII(haystack[i]) != toLowerASCII(prefix[i]) {
240 return false
241 }
242 }
243 return true
244}
245
246// scorePath computes a relevance score for a candidate path
247// against a query. The score combines several signals:

Callers 1

scorePathFunction · 0.85

Calls 1

toLowerASCIIFunction · 0.85

Tested by

no test coverage detected