MyApp.Cldr.Currency.known_currency_code
You're seeing just the function
known_currency_code
, go back to MyApp.Cldr.Currency module for more information.
Specs
known_currency_code(Cldr.Currency.code()) :: {:ok, Cldr.Currency.code()} | {:error, {module(), String.t()}}
Returns a 2-tuple indicating if the supplied currency code is known.
Arguments
currency_code
is abinary
oratom
representing an ISO4217 currency code
Returns
{:ok, currency_code}
or{:error, {exception, reason}}
Examples
iex> MyApp.Cldr.Currency.known_currency_code "AUD"
{:ok, :AUD}
iex> MyApp.Cldr.Currency.known_currency_code "GGG"
{:error, {Cldr.UnknownCurrencyError, "The currency \"GGG\" is invalid"}}