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.
Link to this function

known_currency_code(currency_code)

View Source

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 a binary or atom 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"}}