phone v0.1.0 Phone
Phone is a real telephone number parser, that will help you get useful information from numbers.
How to use
Very simple to use:
iex> Phone.parse("555112345678")
{:ok, %{a2: "BR", a3: "BRA", country: "Brazil", international_code: "55", area_code: "51", number: "12345678"}}
Summary
Functions
Parses a string and returns a map with information about that number
Functions
Parses a string and returns a map with information about that number.
iex> Phone.parse("555112345678")
{:ok, %{a2: "BR", a3: "BRA", country: "Brazil", international_code: "55", area_code: "51", number: "12345678"}}
iex> Phone.parse("+55(51)1234-5678")
{:ok, %{a2: "BR", a3: "BRA", country: "Brazil", international_code: "55", area_code: "51", number: "12345678"}}
iex> Phone.parse("55 51 1234-5678")
{:ok, %{a2: "BR", a3: "BRA", country: "Brazil", international_code: "55", area_code: "51", number: "12345678"}}
iex> Phone.parse(555112345678)
{:ok, %{a2: "BR", a3: "BRA", country: "Brazil", international_code: "55", area_code: "51", number: "12345678"}}