Automate

Automate

Make your phone or tablet smarter with automation

Get it on Google Play

phoneFormat

text phoneFormat(phone, standard, country)

Returns the phone number formatted according to standard in country.

Supported standards:

  • "default" for the rules of the country the number is from, the default
  • "normalize" to remove any non-digits except keypad letters which are converted to its digits
  • "rfc3966" for a RFC3966 representation (Android 5+)
  • "e164" for a E.164 representation (Android 6+)

Parameters

  1. phone — phone number (text) to format.
  2. standard — optional formatting standard, default is phone number country or carrier specific.
  3. country — optional two-letter country code, used when phone number lacks a country code.

Returns

  • the formatted phone number, or the original phone number if invalid or unformattable.
Note! This documentation is also accessible within the app from Help & feedback menu.