2021-04-01 10:37:52 -05:00
2021-02-07 15:09:13 -06:00
2021-02-07 15:09:13 -06:00
2021-02-07 15:09:13 -06:00
2021-02-07 15:12:33 -06:00
2021-02-07 15:21:01 -06:00
2021-02-07 15:19:37 -06:00
2021-04-01 10:37:52 -05:00

Go Roman Numerals

Convert to and from roman numerals in Go.

package main 

import (
	"fmt"
	"github.com/brandenc40/romannumeral"
)

func ExampleToInt() {
	integer, err := romannumeral.ToInt("IV")
	if err != nil {
		panic(err)
	}
	fmt.Println(integer == 4)
}

func ExampleFromInt() {
	roman, err := romannumeral.FromInt(4)
	if err != nil {
		panic(err)
	}
	fmt.Println(roman == "IV")
}
S
Description
Convert integers to roman numerals in Go.
Readme Apache-2.0
86 KiB
Languages
Go 100%