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

Function prefix2

agent/filefinder/text.go:121–130  ·  view source on GitHub ↗
(name []byte)

Source from the content-addressed store, hash-verified

119}
120
121func prefix2(name []byte) uint16 {
122 if len(name) == 0 {
123 return 0
124 }
125 hi := uint16(toLowerASCII(name[0])) << 8
126 if len(name) < 2 {
127 return hi
128 }
129 return hi | uint16(toLowerASCII(name[1]))
130}
131
132// scoreParams controls the weights for each scoring signal.
133type scoreParams struct {

Callers 2

searchShortFunction · 0.85
AddMethod · 0.85

Calls 1

toLowerASCIIFunction · 0.85

Tested by

no test coverage detected