https://github.com/daniellowtw/go-spell-number
A small dependency free library to turn spell out numbers up to uint64.
https://github.com/daniellowtw/go-spell-number
convert-number-to-english-words convert-numbers-to-words go golang spell
Last synced: 6 months ago
JSON representation
A small dependency free library to turn spell out numbers up to uint64.
- Host: GitHub
- URL: https://github.com/daniellowtw/go-spell-number
- Owner: daniellowtw
- License: mit
- Created: 2020-05-12T07:17:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-14T08:41:43.000Z (about 6 years ago)
- Last Synced: 2024-06-20T00:35:08.275Z (about 2 years ago)
- Topics: convert-number-to-english-words, convert-numbers-to-words, go, golang, spell
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-spell-number
A small dependency free library to turn spell out numbers. It supports positive numbers up to uint64.
# Usage
```go
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 ...
}
```