Magik.Formatter (Magik v0.10.0) View Source
Provides functions to format value to string
Link to this section Summary
Functions
Format currency value to thousand separated string
Format number to thousand seperated string
Link to this section Functions
Format currency value to thousand separated string
Parameters
number
: integer numberopts
: list of format optionsthousand_separator
: thousand separator character. Default is,
currency
: currency character. Default is "đ"
Example
iex> Magik.Formatter.format_currency("1232321", thousand_separator: ".", currency: "$") 1.232.321$
Format number to thousand seperated string
Parameters
number
: integer numberseparator
: thousand separator character. Default is.
Example
iex> Magik.Formatter.format_thousand("1232321", ".")
1.232.321