This package will help you to convert a decimal to an Indonesian wording format, for example 123
will be converted to seratus dua puluh tiga
. This package was inspired from develoka/angka-terbilang-js by Develoka Team.
These instructions will get you this package can be used in your project.
Prequisites Packages:
- Go (Go Programming Language)
Below is the instructions to use this package:
- Import this package to your code
...
import (
...
angka "github.com/dimaskiddo/angka-terbilang-go"
...
)
...
- Use ToTerbilang function to convert your decimal string
...
fmtTerbilang := angka.ToTerbilang("123");
fmt.Println(fmtTerbilang);
...
- Download and make the package as vendor
GO111MODULE=on go mod vendor
Below is the simple example source code:
package main
import (
angka "github.com/dimaskiddo/angka-terbilang-go"
)
func main() {
fmt.Printf("%v\n", angka.ToTerbilang("123"));
}
Currently the test is not ready yet :)
- Go - Go Programming Languange
- Dimas Restu Hidayanto - Initial Work - DimasKiddo
See also the list of contributors who participated in this project