Skip to content

textonumber convert ordinal or roman numbers into their decimal representation

Notifications You must be signed in to change notification settings

tugorez/textonumber

Repository files navigation

textonumber

travis

textonumber convert ordinal or roman numbers into their decimal representation

#How to

package main
import (
	"fmt"
	"github.com/tugorez/textonumber"
	"log"
)

func main() {
	roman := "III"
	number, err := textonumber.ToInt(roman)
	if err != nil {
		log.Fatal(err)
	}
	snumber, err := textonumber.ToString(roman)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("The dec representation of %s is %d(as int) \"%s\"(as string)\n",
		roman, number, snumber)
}

About

textonumber convert ordinal or roman numbers into their decimal representation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages