worldwide/calling_code

Types

An international calling code: a country code, and an optional area code for territories that share a country code (e.g. +1 340 for the U.S. Virgin Islands, under the shared North American +1).

pub type CallingCode {
  CallingCode(country_code: Int, area_code: option.Option(Int))
}

Constructors

Values

pub fn to_string(calling_code: CallingCode) -> String

Formats a calling code for display, e.g. "+1 (340)" or "+34".

Search Document