View Source Money.Sigil (Money v5.13.0)

Link to this section Summary

Link to this section Functions

Link to this function

sigil_M(amount, currency)

View Source
@spec sigil_M(binary(), list()) :: Money.t() | {:error, {Exception.t(), String.t()}}

Implements the sigil ~M for Money

The lower case ~m variant does not exist as interpolation and excape characters are not useful for Money sigils.



iex> import Money.Sigil
iex> ~M[1000]usd, "1000")
iex> ~M[1000.34]usd, "1000.34")
Link to this function


View Source