code: func maybeStripExtension(number *builder.Builder) string {
  	// If we find a potential extension, and the number preceding this is
  	// a viable number, we assume it is an extension.
  	numStr := number.String()
  	ind := EXTN_PATTERN.FindStringIndex(numStr)
  	if len(ind) > 0 && isViablePhoneNumber(numStr[0:ind[0]]) {
  		// The numbers are captured into groups in the regular expression.
  		for _, extensionGroup := range EXTN_PATTERN.FindAllStringIndex(numStr, -1) {
  			if len(extensionGroup) == 0 {
  				continue
  			}
  			// We go through the capturing groups until we find one
  			// that captured some digits. If none did, then we will
  			// return the empty string.
  			extension := numStr[extensionGroup[0]:extensionGroup[1]]
  			number.ResetWithString(numStr[0:ind[0]])
  			return extension
  		}
  	}
  	return ""
  }
docs: // Strips any extension (as in, the part of the number dialled after the
  // call is connected, usually indicated with extn, ext, x or similar) from
  // the end of the number, and returns it.
  // @VisibleForTesting