curtow

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package curtow converts currency to words.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64

func Float64(amount float64, language lang.Lang, options ...interface{}) (words string, err error)

Float64 converts amount to words

func MustFloat64

func MustFloat64(amount float64, language lang.Lang, options ...interface{}) string

MustFloat64 converts amount to words, on error returns empty string.

func MustString

func MustString(amount string, language lang.Lang, options ...interface{}) string

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

func String

func String(amount string, language lang.Lang, options ...interface{}) (words string, err error)

String converts amount to words

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL