From 2d2045a9071bf6e327d771dd8c8f30785036f05d Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Thu, 14 Dec 2023 15:58:29 -0500 Subject: [PATCH] Remove unused methods --- phonenumbers.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/phonenumbers.go b/phonenumbers.go index b295c76..fb5ea06 100644 --- a/phonenumbers.go +++ b/phonenumbers.go @@ -781,16 +781,6 @@ func normalize(number string) string { return NormalizeDigitsOnly(number) } -// Normalizes a string of characters representing a phone number. This is -// a wrapper for normalize(String number) but does in-place normalization -// of the StringBuilder provided. -func normalizeBytes(number *Builder) *Builder { - normalizedNumber := normalize(number.String()) - b := number.Bytes() - copy(b[0:len(normalizedNumber)], []byte(normalizedNumber)) - return NewBuilder(b) -} - // Normalizes a string of characters representing a phone number. This // converts wide-ascii and arabic-indic numerals to European numerals, // and strips punctuation and alpha characters. @@ -2446,21 +2436,6 @@ func IsPossibleNumberWithReason(number *PhoneNumber) ValidationResult { return testNumberLength(nationalNumber, metadata, UNKNOWN) } -// Check whether a phone number is a possible number given a number in the -// form of a string, and the region where the number could be dialed from. -// It provides a more lenient check than IsValidNumber(). See -// IsPossibleNumber(PhoneNumber) for details. -// -// This method first parses the number, then invokes -// IsPossibleNumber(PhoneNumber) with the resultant PhoneNumber object. -func isPossibleNumberWithRegion(number, regionDialingFrom string) bool { - num, err := Parse(number, regionDialingFrom) - if err != nil { - return false - } - return IsPossibleNumber(num) -} - // Attempts to extract a valid number from a phone number that is too long // to be valid, and resets the PhoneNumber object passed in to that valid // version. If no valid number could be extracted, the PhoneNumber object