-------------------------------------------- sharedPrefixLen returns the length of the prefix shared by a and b, which can might be 0 length.
(a, b []byte)
| 487 | // sharedPrefixLen returns the length of the prefix shared by a and b, |
| 488 | // which can might be 0 length. |
| 489 | func sharedPrefixLen(a, b []byte) int { |
| 490 | i := 0 |
| 491 | for i < len(a) && i < len(b) { |
| 492 | if a[i] != b[i] { |
| 493 | return i |
| 494 | } |
| 495 | i++ |
| 496 | } |
| 497 | return i |
| 498 | } |
no outgoing calls
searching dependent graphs…