Class NumericFormattingSupport

java.lang.Object
org.rumbledb.runtime.functions.util.formatting.NumericFormattingSupport

public final class NumericFormattingSupport extends Object
Locale-independent digit formatting: grouping and alphabetic. Locale-sensitive words and Roman numerals live in NumberWords.
  • Method Details

    • toDecimalString

      public static String toDecimalString(BigInteger value)
    • applyGrouping

      public static String applyGrouping(String digits, NumericPicture picture)
    • applyGrouping

      public static String applyGrouping(String digits, List<GroupingPos> groupingPositions, Integer repeatingInterval, boolean groupFromRight)
      Inserts grouping separators into a run of digits. With groupFromRight the positions are counted from the right (integer part); otherwise from the left (fractional part). A non-null repeatingInterval groups at a fixed periodic interval instead of at the explicit positions.
    • mapAsciiDigits

      public static String mapAsciiDigits(String s, int zeroDigit)
      Maps the ASCII digits of s into the Unicode digit family whose zero is zeroDigit, leaving every other character unchanged.
    • integerToAlphabetic

      public static String integerToAlphabetic(int number, boolean lowerCase)