https://github.com/parithiban/numtowords
Convert number to words
https://github.com/parithiban/numtowords
converter numtowords
Last synced: 19 days ago
JSON representation
Convert number to words
- Host: GitHub
- URL: https://github.com/parithiban/numtowords
- Owner: parithiban
- License: mit
- Created: 2020-04-14T14:24:57.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-03T17:05:25.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T16:40:22.883Z (almost 2 years ago)
- Topics: converter, numtowords
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# numtowords
[](https://pkg.go.dev/github.com/parithiban/numtowords)
[](https://goreportcard.com/report/github.com/parithiban/numtowords)
[](https://travis-ci.org/parithiban/numtowords)
[](https://codecov.io/github/parithiban/numtowords?branch=master)
[](https://GitHub.com/parithiban/numtowords/graphs/contributors/)

This is a utility package written in go which is used to convert the number to words.
## Installation
This requires Go version 1.11 or later.
> go get -u github.com/parithiban/numtowords
## Example
```code
words := numtowords.Transform(1234) //output: "one thousand two hundred thirty four"
words := numtowords.Transform(100000000000) //output: "one hundred billion"
words := numtowords.Transform(000000000) //output: "zero"
words := numtowords.Transform(1100100100300800112) //output: "one quintillion one hundred quadrillion one hundred trillion one hundred billion three hundred million eight hundred thousand one hundred twelve"
```
[Playground Link](https://play.golang.org/p/7XhcBcMedCh)