Skip to content
pubscout

numerus

2.3.2, released 6 months ago by noonshy.com

Translate integers to Roman numerals and Roman numeral strings to integers in Dart.

WASM-ready
$ flutter pub add numerus
Source repository

What it does

Provides Dart extensions to translate decimal integers to Roman numerals and validate or parse Roman numeral strings back to integers. Supports multiple configurations such as common, vinculum, apostrophus, and compact apostrophus styles.

AI-written summary of version 2.3.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to format numbers as Roman numerals in your Dart or Flutter application.
  • You need to parse or validate Roman numeral strings.

Skip it when

  • You require support for negative numbers or complex non-standard formats out of the box.

Strengths

  • Supports multiple Roman numeral configuration styles including common, vinculum, and apostrophus.
  • Provides string validation and custom zero (nulla) placeholder support.
  • Simple extension-based API.

Weaknesses

  • Negative numbers are not supported.
  • Compact apostrophus styles require fonts that support specific Unicode characters.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Not documented

import 'package:numerus/numerus.dart';

void main() {
  var n = 418;
  print(n.toRomanNumeralString());
  // 'CDXVIII'

  var str = 'CDXVIII';
  print(str.isValidRomanNumeralValue());
  // true
  print(str.toRomanNumeralValue());
  // 418
}

Alternatives

Packages that do the same job and could replace numerus.

  • validators2

    String validation and sanitization for Dart.

  • extension_utils

    Dart and Flutter extension library for strings, collections, dates, numbers, and colors.

  • kartal

    Collection of Dart and Flutter extensions for context, primitive variables, and common utilities.

  • tint

    Terminal string styling as an extension on String.

Works with

Packages commonly used together with numerus: ones it builds on, ones built on it, and its own family.