Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yousifnimah committed Jul 1, 2023
1 parent 5af6e03 commit 8a2b94c
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 2 deletions.
62 changes: 61 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,62 @@
# NumToWordsGo
A lightweight and efficient Go library that provides a simple function to convert numeric values into their corresponding word representation.
<img src="https://i.imgur.com/S8iiTSg.png" height="300">

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)

NumToWordsGo is a lightweight and efficient Go library that provides a simple function to convert numeric values into their corresponding word representation. With this library, you can easily convert numbers to words, making it useful for applications that require human-readable number formatting or text generation.

## Features

- Convert numbers to their word representation
- Supports numbers up to billions
- Efficient and easy-to-use

## Installation

To use NumToWordsGo in your Go project, you need to install it using `go get` command:

```bash
go get github.com/yousifnimah/NumToWordsGo
```


## Usage

Here's an example of how to use NumToWordsGo in your Go code:

```go
package main

import (
"fmt"
"github.com/yousifnimah/NumToWordsGo/NumToWords"
)

func main() {
input := 123456789
words, err := NumToWords.Convert(input, "en")
if err != nil {
return
}
fmt.Println(words)
}
```

Output:
```go
one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine
```

In the example above, we import the NumToWordsGo package and use the NumToWords function to convert the number 123456789 into its word representation. The result is then printed to the console.


## License
This project is licensed under the MIT License. See the LICENSE file for details.

## Contributing
Contributions are welcome! If you find any issues or want to add new features or improvements, please create a pull request.

## Acknowledgments
This library is inspired by the need for number-to-word conversion in various applications.
Contact
For any questions or inquiries, please feel free to contact me.
2 changes: 1 addition & 1 deletion _example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func main() {
input := 50021
input := 123456789
words, err := NumToWords.Convert(input, "en")
if err != nil {
return
Expand Down

0 comments on commit 8a2b94c

Please sign in to comment.