MyApp.Cldr.Number.to_string-exclamation-mark

You're seeing just the function to_string-exclamation-mark, go back to MyApp.Cldr.Number module for more information.
Link to this function

to_string!(number, options \\ default_options())

View Source

Specs

to_string!(number() | Decimal.t(), Keyword.t() | map()) :: String.t() | module()

Same as the execution of to_string/2 but raises an exception if an error would be returned.

Arguments

  • number is an integer, float or Decimal to be formatted

  • options is a keyword list defining how the number is to be formatted. See MyApp.Cldr.Number.to_string/2

Returns

  • a formatted number as a string or

  • raises an exception

Examples

iex> MyApp.Cldr.Number.to_string! 12345
"12,345"

iex> MyApp.Cldr.Number.to_string! 12345, locale: "fr"
"12 345"