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

Function longestCommonPrefix

tree.go:61–68  ·  view source on GitHub ↗
(a, b string)

Source from the content-addressed store, hash-verified

59}
60
61func longestCommonPrefix(a, b string) int {
62 i := 0
63 max_ := min(len(a), len(b))
64 for i < max_ && a[i] == b[i] {
65 i++
66 }
67 return i
68}
69
70// addChild will add a child node, keeping wildcardChild at the end
71func (n *node) addChild(child *node) {

Callers 1

addRouteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected