Documentation ¶
Overview ¶
Package curtow converts currency to words.
Index ¶
- func Float64(amount float64, language lang.Lang, options ...interface{}) (words string, err error)
- func MustFloat64(amount float64, language lang.Lang, options ...interface{}) string
- func MustString(amount string, language lang.Lang, options ...interface{}) string
- func String(amount string, language lang.Lang, options ...interface{}) (words string, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustFloat64 ¶
MustFloat64 converts amount to words, on error returns empty string.
func MustString ¶
MustString converts amount to words, on error returns empty string.
Example (Eur) ¶
fmt.Println(MustString("12", lang.EN, en.WithCur(cur.EUR)))
Output: twelve euros and 00 cents
Example (Usd) ¶
fmt.Println(MustString("45.57", lang.EN, en.WithCur(cur.USD), en.WithCurConvMU(true)))
Output: forty-five dollars and fifty-seven cents
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.