BaseNumberFormatter

Class for parsing and formatting a Number from/to a String.

Inheritors

Properties

Link copied to clipboard

When set to true always shows a decimal separator, even when no decimal will be shown.

Link copied to clipboard
abstract var currencyCode: String

The ISO 4217 currency code of this currency

Link copied to clipboard

The symbol used to represent a decimal separator when formatting currency.

Link copied to clipboard
abstract var currencySymbol: String

The text used to represent the currency for the current locale.

Link copied to clipboard
abstract var decimalSeparator: Char

The symbol used to represent a decimal separator.

Link copied to clipboard
abstract var exponentSymbol: String

The symbol used to represent an exponent sign.

Link copied to clipboard
abstract var groupingSeparator: Char

The symbol used to represent a grouping sign.

Link copied to clipboard
abstract var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

Link copied to clipboard
abstract var infinitySymbol: String

The text used to represent infinity.

Link copied to clipboard
abstract val locale: KalugaLocale

KalugaLocale used for formatting.

Link copied to clipboard
abstract var minusSign: Char

The symbol used to represent a minus sign.

Link copied to clipboard
abstract var multiplier: Int

The value a number will be multiplied with when formatted.

Link copied to clipboard
abstract var negativePrefix: String

Text to be added in front of the number when negative

Link copied to clipboard
abstract var negativeSuffix: String

Text to be added behind the number when negative

Link copied to clipboard
abstract var notANumberSymbol: String

The text used to represent a Not a Number value.

Link copied to clipboard
abstract var percentSymbol: Char

The symbol used to represent a percent sign.

Link copied to clipboard
abstract var perMillSymbol: Char

The symbol used to represent a permille sign.

Link copied to clipboard
abstract var positivePrefix: String

Text to be added in front of the number when positive

Link copied to clipboard
abstract var positiveSuffix: String

Text to be added behind the number when positive

Link copied to clipboard

When set to true number grouping is applied

Link copied to clipboard
abstract var zeroSymbol: Char

The symbol used to represent a zero sign.

Functions

Link copied to clipboard
abstract fun format(number: Number): String

Formats a Number into a String.

Link copied to clipboard
abstract fun parse(string: String): Number?

Tries to parse a String into a Number