View Source AddressUS (AddressUS v0.4.3)
Summary
Functions
Abbreviates the state provided.
Converts the country to the 2 digit ISO country code. "US" is default.
Functions
Abbreviates the state provided.
Example
iex> AddressUS.abbreviate_state("Wyoming")
"WY"
iex> AddressUS.abbreviate_state("wyoming")
"WY"
iex> AddressUS.abbreviate_state("Wyomin")
"Wyomin"
iex> AddressUS.abbreviate_state(nil)
nil
Converts the country to the 2 digit ISO country code. "US" is default.
Example
iex> AddressUS.Parser.get_country_code(nil)
"US"
iex> AddressUS.Parser.get_country_code("Afghanistan")
"AF"
iex> AddressUS.Parser.get_country_code("AF")
"AF"