COUNTRY_TO_PHONE_PREFIX¶
Description¶
COUNTRY_TO_PHONE_PREFIX returns the international telephone calling code for a given ISO 3166-1 country code, as a
string prefixed with +.
Both alpha-2 (2-letter) and alpha-3 (3-letter) codes are accepted.
Returns unknown if the input is not a recognised country code.
Syntax¶
Returns: A string such as '+41', or unknown if the input is unrecognised.
Example¶
This returns '+41'.
This also returns '+41'.
This returns '+1'.
This returns unknown, 'XX' is not a valid ISO country code.
Example in context¶
Combines the calling prefix for the person's country with their local number to produce a full international phone
number, e.g.
'+41791234567'.