romanice 2.0.0
romanice: ^2.0.0 copied to clipboard

A Dart library for converting to/from Roman numerals, e.g., 3888 ↔ MMMDCCCLXXXVIII

romanice - Convert to/from Roman numerals #

Version Build Status Coverage Status License

A Dart library for converting to/from Roman numerals, e.g., 3888MMMDCCCLXXXVIII, 38888ↂↂↂↁↀↀↀⅮⅭⅭⅭⅬⅩⅩⅩⅤⅠⅠⅠ

Usage #

See example/main.dart

Standard - I, V, X, L, C, D, M #

final ToRoman standardToRoman = ToRoman();

final String roman = standardToRoman(3888);
// roman == 'MMMDCCCLXXXVIII'

final int decimal = standardToRoman.inverse()('MMMCMXCIX');
// decimal == 3999

Unicode - , , , , , , , , #

final FromRoman unicodeFromRoman = FromRoman.unicode();

final String roman = unicodeFromRoman.inverse()(38888);
// roman == 'ↂↂↂↁↀↀↀⅮⅭⅭⅭⅬⅩⅩⅩⅤⅠⅠⅠ'

final int decimal = unicodeFromRoman('ↂↂↂↀↂⅭↀⅩⅭⅠⅩ');
// decimal == 39999

Syntax #

ToRoman([List<String> _symbols]) #

FromRoman([List<String> _symbols]) #

_symbols - List of Roman numeral symbols representing the character set. If omitted, assumes the standard symbols ['I', 'V', 'X', 'L', 'C', 'D', 'M'].

See documentation for more

License #

MIT

1
likes
130
pub points
29%
popularity

Publisher

dkinom.dev

A Dart library for converting to/from Roman numerals, e.g., 3888 ↔ MMMDCCCLXXXVIII

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

invertible

More

Packages that depend on romanice