MyApp.Cldr.Territory.to_currency_codes

You're seeing just the function to_currency_codes, go back to MyApp.Cldr.Territory module for more information.
Link to this function

to_currency_codes(territory_code, opts \\ [as: :atom])

View Source

Specs

A helper method to get a territory's currency codes. Returns {:ok, list} if successful, otherwise {:error, reason}.

  • options are:
    • as: :atom
    • as: :binary
    • as: :charlist

Example

iex> MyApp.Cldr.Territory.to_currency_codes(:US)
{:ok, [:USD]}

iex> MyApp.Cldr.Territory.to_currency_codes("cu")
{:ok, [:CUP, :CUC]}