NumeralNumExtension extension
Fluent formatting helpers for num values.
- on
Methods
-
bytes(
{bool binary = false, NumeralUnitSet? unitSet, bool? spaceBeforeUnit, NumeralCodec< num> ? style, String decimalSeparator = '.', int minFractionDigits = 0, int maxFractionDigits = 2, bool trimTrailingZeros = true, Rounding rounding = Rounding.halfUp}) → String -
Available on num, provided by the NumeralNumExtension extension
Formats this value as a byte size. -
compact(
{NumeralUnitSet unitSet = en.englishCompactUnits, NumeralCodec< num> ? style, String decimalSeparator = '.', int minFractionDigits = 0, int maxFractionDigits = 2, bool trimTrailingZeros = true, Rounding rounding = Rounding.halfUp, bool compactOverflow = true}) → String -
Available on num, provided by the NumeralNumExtension extension
Formats this value using compact units. -
currency(
String symbol, {bool symbolOnRight = false, bool spaceBetweenSymbolAndNumber = false, NumeralCodec< num> ? style, bool grouping = true, String groupSeparator = ',', String decimalSeparator = '.', int minFractionDigits = 2, int maxFractionDigits = 2, bool trimTrailingZeros = false, Rounding rounding = Rounding.halfUp}) → String -
Available on num, provided by the NumeralNumExtension extension
Formats this value as a display-oriented currency string. -
decimal(
{bool grouping = true, String groupSeparator = ',', String decimalSeparator = '.', int minFractionDigits = 0, int maxFractionDigits = 3, bool trimTrailingZeros = true, Rounding rounding = Rounding.halfUp}) → String -
Available on num, provided by the NumeralNumExtension extension
Formats this value as an ordinary decimal number. -
formatWith<
T extends num> (NumeralCodec< T> codec) → String -
Available on num, provided by the NumeralNumExtension extension
Formats this value with an existing codec. -
percent(
{String symbol = '%', num scale = 100, bool spaceBeforeSymbol = false, bool requireSymbol = true, NumeralCodec< num> ? style, String decimalSeparator = '.', int minFractionDigits = 0, int maxFractionDigits = 2, bool trimTrailingZeros = true, Rounding rounding = Rounding.halfUp}) → String -
Available on num, provided by the NumeralNumExtension extension
Formats this value as a percentage ratio.