(a, b string)
| 59 | } |
| 60 | |
| 61 | func 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 |
| 71 | func (n *node) addChild(child *node) { |