-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5af6e03
commit 8a2b94c
Showing
2 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters