Library API
    Preparing search index...

    Function toRoman

    • Converts a positive integer into its Roman numeral string representation.

      Parameters

      • num: number

        An integer from 1 through 3999

      Returns string

      Uppercase subtractive Roman numerals, or an empty string for non-integers or values outside that range

      toRoman(2026); // 'MMXXVI'
      toRoman(14); // 'XIV'