NumToStringExtensions extension

Num conversion to string extensions

on

Properties

toBinaryString String

Available on num, provided by the NumToStringExtensions extension

Converts the number to a binary (base-2) string representation.
no setter
toHexString String

Available on num, provided by the NumToStringExtensions extension

Converts the number to a hexadecimal (base-16) string representation.
no setter

Methods

formatMoney({String symbol = '', int decimalDigits = 2}) String

Available on num, provided by the NumToStringExtensions extension

Formats the number as a money string with custom prefix, thousand separators and a specified number of decimal places.
toCurrency({String symbol = '\$'}) String

Available on num, provided by the NumToStringExtensions extension

Converts the number to a currency string format with an optional symbol prefix.
toFileSize({int decimals = 2}) String

Available on num, provided by the NumToStringExtensions extension

Converts the number (bytes) to a human-readable file size string.
toMoney({int decimalDigits = 2}) String

Available on num, provided by the NumToStringExtensions extension

Formats the number as a money string with thousand separators and a specified number of decimal places.