Class NumericFormattingSupport
java.lang.Object
org.rumbledb.runtime.functions.util.formatting.NumericFormattingSupport
Locale-independent digit formatting: grouping and alphabetic. Locale-sensitive words and Roman numerals live in
NumberWords.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyGrouping(String digits, List<GroupingPos> groupingPositions, Integer repeatingInterval, boolean groupFromRight) Inserts grouping separators into a run of digits.static StringapplyGrouping(String digits, NumericPicture picture) static StringintegerToAlphabetic(int number, boolean lowerCase) static StringmapAsciiDigits(String s, int zeroDigit) Maps the ASCII digits ofsinto the Unicode digit family whose zero iszeroDigit, leaving every other character unchanged.static StringtoDecimalString(BigInteger value)
-
Method Details
-
toDecimalString
-
applyGrouping
-
applyGrouping
public static String applyGrouping(String digits, List<GroupingPos> groupingPositions, Integer repeatingInterval, boolean groupFromRight) Inserts grouping separators into a run of digits. WithgroupFromRightthe positions are counted from the right (integer part); otherwise from the left (fractional part). A non-nullrepeatingIntervalgroups at a fixed periodic interval instead of at the explicit positions. -
mapAsciiDigits
Maps the ASCII digits ofsinto the Unicode digit family whose zero iszeroDigit, leaving every other character unchanged. -
integerToAlphabetic
-