View Source Faker.Address.En (Faker v0.18.0)
Functions for generating addresses in English
Summary
Functions
Return random building number.
Return city name.
Return city prefix.
Return city suffix.
Return country.
Return country code.
Return random secondary address.
Return state.
Return state abbr.
Return street address.
Return street_address/0
or if argument is true
adds secondary_address/0
.
Return street name.
Return street suffix.
Return time zone.
Return random postcode.
Functions
@spec building_number() :: String.t()
Return random building number.
Examples
iex> Faker.Address.En.building_number()
"15426"
iex> Faker.Address.En.building_number()
"6"
iex> Faker.Address.En.building_number()
"0832"
iex> Faker.Address.En.building_number()
"7"
@spec city() :: String.t()
Return city name.
Examples
iex> Faker.Address.En.city()
"Elizabeth"
iex> Faker.Address.En.city()
"Rolfson"
iex> Faker.Address.En.city()
"West Conor"
iex> Faker.Address.En.city()
"Hardy"
@spec city_prefix() :: String.t()
Return city prefix.
Examples
iex> Faker.Address.En.city_prefix()
"Port"
iex> Faker.Address.En.city_prefix()
"West"
iex> Faker.Address.En.city_prefix()
"North"
iex> Faker.Address.En.city_prefix()
"Lake"
@spec city_suffix() :: String.t()
Return city suffix.
Examples
iex> Faker.Address.En.city_suffix()
"burgh"
iex> Faker.Address.En.city_suffix()
"mouth"
iex> Faker.Address.En.city_suffix()
"burgh"
iex> Faker.Address.En.city_suffix()
"view"
@spec country() :: String.t()
Return country.
Examples
iex> Faker.Address.En.country()
"Guinea-Bissau"
iex> Faker.Address.En.country()
"Tuvalu"
iex> Faker.Address.En.country()
"Portugal"
iex> Faker.Address.En.country()
"United Arab Emirates"
@spec country_code() :: String.t()
Return country code.
Examples
iex> Faker.Address.En.country_code()
"IT"
iex> Faker.Address.En.country_code()
"MR"
iex> Faker.Address.En.country_code()
"GM"
iex> Faker.Address.En.country_code()
"CX"
@spec secondary_address() :: String.t()
Return random secondary address.
Examples
iex> Faker.Address.En.secondary_address()
"Apt. 154"
iex> Faker.Address.En.secondary_address()
"Apt. 646"
iex> Faker.Address.En.secondary_address()
"Suite 083"
iex> Faker.Address.En.secondary_address()
"Apt. 970"
@spec state() :: String.t()
Return state.
Examples
iex> Faker.Address.En.state()
"Hawaii"
iex> Faker.Address.En.state()
"Alaska"
iex> Faker.Address.En.state()
"Oklahoma"
iex> Faker.Address.En.state()
"California"
@spec state_abbr() :: String.t()
Return state abbr.
Examples
iex> Faker.Address.En.state_abbr()
"HI"
iex> Faker.Address.En.state_abbr()
"AK"
iex> Faker.Address.En.state_abbr()
"OK"
iex> Faker.Address.En.state_abbr()
"CA"
@spec street_address() :: String.t()
Return street address.
Examples
iex> Faker.Address.En.street_address()
"15426 Padberg Mews"
iex> Faker.Address.En.street_address()
"83297 Jana Spring"
iex> Faker.Address.En.street_address()
"57 Legros Cletus Field"
iex> Faker.Address.En.street_address()
"32097 Brekke Ladarius Turnpike"
Return street_address/0
or if argument is true
adds secondary_address/0
.
Examples
iex> Faker.Address.En.street_address(true)
"15426 Padberg Mews, Apt. 832"
iex> Faker.Address.En.street_address(false)
"7 Jana Spring"
iex> Faker.Address.En.street_address(true)
"57 Legros Cletus Field, Apt. 320"
iex> Faker.Address.En.street_address(false)
"7 Brekke Ladarius Turnpike"
@spec street_name() :: String.t()
Return street name.
Examples
iex> Faker.Address.En.street_name()
"Elizabeth Freeway"
iex> Faker.Address.En.street_name()
"Sipes Trycia Glen"
iex> Faker.Address.En.street_name()
"Schiller Delphine Points"
iex> Faker.Address.En.street_name()
"Murphy Shore"
@spec street_suffix() :: String.t()
Return street suffix.
Examples
iex> Faker.Address.En.street_suffix()
"View"
iex> Faker.Address.En.street_suffix()
"Locks"
iex> Faker.Address.En.street_suffix()
"Freeway"
iex> Faker.Address.En.street_suffix()
"Lodge"
@spec time_zone() :: String.t()
Return time zone.
Examples
iex> Faker.Address.En.time_zone()
"Europe/Istanbul"
iex> Faker.Address.En.time_zone()
"Europe/Copenhagen"
iex> Faker.Address.En.time_zone()
"America/Indiana/Indianapolis"
iex> Faker.Address.En.time_zone()
"America/Guyana"
@spec zip_code() :: String.t()
Return random postcode.
Examples
iex> Faker.Address.En.zip_code()
"01542"
iex> Faker.Address.En.zip_code()
"64610"
iex> Faker.Address.En.zip_code()
"83297"
iex> Faker.Address.En.zip_code()
"05235"