MCPcopy
hub / github.com/gin-gonic/gin / shiftNRuneBytes

Function shiftNRuneBytes

tree.go:687–700  ·  view source on GitHub ↗

Shift bytes in array by n bytes left

(rb [4]byte, n int)

Source from the content-addressed store, hash-verified

685
686// Shift bytes in array by n bytes left
687func shiftNRuneBytes(rb [4]byte, n int) [4]byte {
688 switch n {
689 case 0:
690 return rb
691 case 1:
692 return [4]byte{rb[1], rb[2], rb[3], 0}
693 case 2:
694 return [4]byte{rb[2], rb[3]}
695 case 3:
696 return [4]byte{rb[3]}
697 default:
698 return [4]byte{}
699 }
700}
701
702// Recursive case-insensitive lookup function used by n.findCaseInsensitivePath
703func (n *node) findCaseInsensitivePathRec(path string, ciPath []byte, rb [4]byte, fixTrailingSlash bool) []byte {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected