toE164

fun String.toE164(countryCode: String = "1"): String(source)

Formats a phone number in E.164 international format. Assumes +1 country code if none provided and digits length is 10. Example: "8005550199".toE164() → "+18005550199"