NumToWord
NumToWord is a simple Golang package for converting a number into its corresponding italian word value.
For example, let's take 10
. NumToWord converts it to dieci
which means ten.
NumToWord can take numbers up to 12 digits long. You can see a live demo here:
https://cianoscatolo.it/numberToWord?number=YourNumberHere
Basic usage
In this example, you can see the basic usage of this package.
package main
import (
ntw "github.com/cianoscatolo/numtoword"
"fmt"
)
func main() {
num := 256987
conv, err := ntw.Convert(num)
if err != nil {
fmt.Println("Error: "+err.Error())
return
}
fmt.Println(conv)
}
Bugs & Optimization
Please, open an issue or DM me on Telegram at @cianoscatolo if you find an issue or a way to optimize the code. It's the first package I have ever created, so every piece of feedback is helpful to me.