Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 511 Bytes

README.md

File metadata and controls

21 lines (17 loc) · 511 Bytes

go-spell-number

A small dependency free library to turn spell out numbers. It supports positive numbers up to uint64.

Usage

package main

import (
    "github.com/daniellowtw/go-spell-number"
    "math"
)

func main() {
    spell.Number(123) // one hundred twenty three
    spell.Number(4123) // four thousand one hundred twenty three
    spell.Number(1e6) // one million
    spell.Number(math.MaxInt64) // nine quintillion ...
    spell.LargeNumber(math.MaxUint64) // eighteen quintillion ...
}