DarkMatter.Decimals.to_string

You're seeing just the function to_string, go back to DarkMatter.Decimals module for more information.

Specs

Rounds an x of type nil or DarkMatter.numeric/0 into a String.t/0.

Examples

iex> to_string(%Decimal{coef: 12, exp: -10})
"0.0000000012"

iex> to_string(%Decimal{coef: 124_225, exp: -3})
"124.225"

iex> to_string("$0")
"0"

iex> to_string(nil)
nil

iex> to_string("xyz")
** (Decimal.Error): number parsing syntax: "xyz"

Specs

See DarkMatter.Decimals.Conversion.to_string/2.