@@ -0,0 +1,11 @@
|
||||
package ysphone
|
||||
|
||||
import "github.com/nyaruka/phonenumbers"
|
||||
|
||||
func FormatPhoneNumber(phoneNumber string) string {
|
||||
if phoneNumber == "" {
|
||||
return ""
|
||||
}
|
||||
num, _ := phonenumbers.Parse(phoneNumber, "CN")
|
||||
return phonenumbers.Format(num, phonenumbers.E164)
|
||||
}
|
||||
Reference in New Issue
Block a user