romanice

Last updated:

0 purchases

romanice Image
romanice Images
Add to Cart

Description:

romanice

romanice - Convert to/from Roman numerals #




A Dart library for converting to/from Roman numerals, e.g., 3888↔MMMDCCCLXXXVIII, 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
copied to clipboard
Unicode - Ⅰ, Ⅴ, Ⅹ, Ⅼ, Ⅽ, Ⅾ, ↀ, ↁ, ↂ #
final FromRoman unicodeFromRoman = FromRoman.unicode();

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

final int decimal = unicodeFromRoman('ↂↂↂↀↂⅭↀⅩⅭⅠⅩ');
// decimal == 39999
copied to clipboard
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

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.