Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Amount ¶
type Amount struct { // Quantity is the quantity of the amount. Quantity float64 // Currency is the currency of the amount. Currency string }
Amount represents a quantity of money with a currency.
func Parse ¶
Parse returns an Amount of money with quantity and currency (if identified) and an error.
func ParseComma ¶
ParseComma parses the amount of money in the text with "," instead of "." as decimal separator.
func (Amount) String ¶
String returns the money as string in the format "[QUANTITY](.DECIMAL)(M|k)( CURRENCY)".
func (Amount) StringBefore ¶
StringBefore returns the money as string in the format "[CURRENCY][QUANTITY](.DECIMAL)(M|k)".
func (Amount) StringComma ¶
StringComma returns the money as string in the format "[QUANTITY](,DECIMAL)(M|k)( CURRENCY)".
Click to show internal directories.
Click to hide internal directories.