code: func numOfMatchingPathComponents(pth string, matchComponents []string) int {
  	pthComponents := getPathComponents(pth)
  	i := 0
  	for ; i < len(pthComponents) && i < len(matchComponents); i++ {
  		if matchComponents[i] != pthComponents[i] {
  			return i
  		}
  	}
  	return i
  }
docs: // numOfMatchingPathComponents returns a number of path components in "pth" that exactly match "matchComponents".