Files
2026-05-20 16:13:58 +08:00

12 lines
253 B
Go

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)
}