https://github.com/vinbyte/num2words
Golang package to convert number into words
https://github.com/vinbyte/num2words
Last synced: about 1 month ago
JSON representation
Golang package to convert number into words
- Host: GitHub
- URL: https://github.com/vinbyte/num2words
- Owner: vinbyte
- License: mit
- Created: 2021-02-14T05:40:03.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-14T13:20:04.000Z (about 5 years ago)
- Last Synced: 2024-06-20T07:57:04.513Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Number to Words
[](https://circleci.com/gh/circleci/circleci-docs) [](https://coveralls.io/github/vinbyte/num2words?branch=main) [](https://pkg.go.dev/github.com/vinbyte/num2words)
Golang package to convert number into words. For example : `148` become `one hundred forty-eight`. Inspired by this python library [num2words](https://github.com/savoirfairelinux/num2words).
## Install
Run `go get -u github.com/vinbyte/num2words`
## Usage
```
package main
import (
"fmt"
"github.com/vinbyte/num2words"
)
func main() {
n2w := num2words.New("en")
res := n2w.NumberToWord(349)
fmt.Println(res)
}
//output : three hundred forty-nine
```
## Test
Run `go test -v`