NumberFormatter

Default implementation of BaseNumberFormatter

Parameters

locale

The KalugaLocale used for parsing. Defaults to KalugaLocale.defaultLocale.

style

The NumberFormatStyle to configure the format to use. Defaults to NumberFormatStyle.Decimal.

expect class NumberFormatter(locale: KalugaLocale = defaultLocale, style: NumberFormatStyle = NumberFormatStyle.Decimal()) : BaseNumberFormatter

Default implementation of BaseNumberFormatter

Parameters

locale

The KalugaLocale used for parsing. Defaults to KalugaLocale.defaultLocale.

style

The NumberFormatStyle to configure the format to use. Defaults to NumberFormatStyle.Decimal.

actual class NumberFormatter

Default implementation of BaseNumberFormatter

Parameters

locale

The KalugaLocale used for parsing. Defaults to KalugaLocale.defaultLocale.

style

The NumberFormatStyle to configure the format to use. Defaults to NumberFormatStyle.Decimal.

Default implementation of BaseNumberFormatter

Parameters

locale

The KalugaLocale used for parsing. Defaults to KalugaLocale.defaultLocale.

style

The NumberFormatStyle to configure the format to use. Defaults to NumberFormatStyle.Decimal.

Default implementation of BaseNumberFormatter

Parameters

locale

The KalugaLocale used for parsing. Defaults to KalugaLocale.defaultLocale.

style

The NumberFormatStyle to configure the format to use. Defaults to NumberFormatStyle.Decimal.

Constructors

Link copied to clipboard
actual constructor(locale: KalugaLocale, style: NumberFormatStyle)
expect constructor(locale: KalugaLocale = defaultLocale, style: NumberFormatStyle = NumberFormatStyle.Decimal())
actual constructor(locale: KalugaLocale, style: NumberFormatStyle)
actual constructor(locale: KalugaLocale, style: NumberFormatStyle)

Properties

Link copied to clipboard

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

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

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

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

Link copied to clipboard
open override var currencyCode: String

The ISO 4217 currency code of this currency

abstract var currencyCode: String

The ISO 4217 currency code of this currency

open override var currencyCode: String

The ISO 4217 currency code of this currency

open override var currencyCode: String

The ISO 4217 currency code of this currency

Link copied to clipboard
open override var currencyDecimalSeparator: Char

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

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

open override var currencyDecimalSeparator: Char

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

open override var currencyDecimalSeparator: Char

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

Link copied to clipboard
open override var currencySymbol: String

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

abstract var currencySymbol: String

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

open override var currencySymbol: String

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

open override var currencySymbol: String

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

Link copied to clipboard
open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

abstract var decimalSeparator: Char

The symbol used to represent a decimal separator.

open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

Link copied to clipboard
open override var exponentSymbol: String

The symbol used to represent an exponent sign.

abstract var exponentSymbol: String

The symbol used to represent an exponent sign.

open override var exponentSymbol: String

The symbol used to represent an exponent sign.

open override var exponentSymbol: String

The symbol used to represent an exponent sign.

Link copied to clipboard
open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

abstract var groupingSeparator: Char

The symbol used to represent a grouping sign.

open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

Link copied to clipboard
open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

abstract var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

open var groupingSize: Int
open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

Link copied to clipboard
open override var infinitySymbol: String

The text used to represent infinity.

abstract var infinitySymbol: String

The text used to represent infinity.

open override var infinitySymbol: String

The text used to represent infinity.

open override var infinitySymbol: String

The text used to represent infinity.

Link copied to clipboard
open override val locale: KalugaLocale

KalugaLocale used for formatting.

abstract val locale: KalugaLocale

KalugaLocale used for formatting.

open override val locale: KalugaLocale
open override val locale: KalugaLocale

KalugaLocale used for formatting.

Link copied to clipboard
open override var minusSign: Char

The symbol used to represent a minus sign.

abstract var minusSign: Char

The symbol used to represent a minus sign.

open var minusSign: Char
open override var minusSign: Char

The symbol used to represent a minus sign.

open override var minusSign: Char

The symbol used to represent a minus sign.

Link copied to clipboard
open override var multiplier: Int

The value a number will be multiplied with when formatted.

abstract var multiplier: Int

The value a number will be multiplied with when formatted.

open var multiplier: Int
open override var multiplier: Int

The value a number will be multiplied with when formatted.

open override var multiplier: Int

The value a number will be multiplied with when formatted.

Link copied to clipboard
open override var negativePrefix: String

Text to be added in front of the number when negative

abstract var negativePrefix: String

Text to be added in front of the number when negative

open override var negativePrefix: String

Text to be added in front of the number when negative

open override var negativePrefix: String

Text to be added in front of the number when negative

Link copied to clipboard
open override var negativeSuffix: String

Text to be added behind the number when negative

abstract var negativeSuffix: String

Text to be added behind the number when negative

open override var negativeSuffix: String

Text to be added behind the number when negative

open override var negativeSuffix: String

Text to be added behind the number when negative

Link copied to clipboard
open override var notANumberSymbol: String

The text used to represent a Not a Number value.

abstract var notANumberSymbol: String

The text used to represent a Not a Number value.

open override var notANumberSymbol: String

The text used to represent a Not a Number value.

open override var notANumberSymbol: String

The text used to represent a Not a Number value.

Link copied to clipboard
open override var percentSymbol: Char

The symbol used to represent a percent sign.

abstract var percentSymbol: Char

The symbol used to represent a percent sign.

open override var percentSymbol: Char

The symbol used to represent a percent sign.

open override var percentSymbol: Char

The symbol used to represent a percent sign.

Link copied to clipboard
open override var perMillSymbol: Char

The symbol used to represent a permille sign.

abstract var perMillSymbol: Char

The symbol used to represent a permille sign.

open override var perMillSymbol: Char

The symbol used to represent a permille sign.

open override var perMillSymbol: Char

The symbol used to represent a permille sign.

Link copied to clipboard
open override var positivePrefix: String

Text to be added in front of the number when positive

abstract var positivePrefix: String

Text to be added in front of the number when positive

open override var positivePrefix: String

Text to be added in front of the number when positive

open override var positivePrefix: String

Text to be added in front of the number when positive

Link copied to clipboard
open override var positiveSuffix: String

Text to be added behind the number when positive

abstract var positiveSuffix: String

Text to be added behind the number when positive

open override var positiveSuffix: String

Text to be added behind the number when positive

open override var positiveSuffix: String

Text to be added behind the number when positive

Link copied to clipboard
open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

When set to true number grouping is applied

open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

Link copied to clipboard
open override var zeroSymbol: Char

The symbol used to represent a zero sign.

abstract var zeroSymbol: Char

The symbol used to represent a zero sign.

open var zeroSymbol: Char
open override var zeroSymbol: Char

The symbol used to represent a zero sign.

open override var zeroSymbol: Char

The symbol used to represent a zero sign.

Functions

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

Formats a Number into a String.

abstract fun format(number: Number): String

Formats a Number into a String.

open fun format(number: Number): String
open override fun format(number: Number): String

Formats a Number into a String.

open override fun format(number: Number): String

Formats a Number into a String.

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

Tries to parse a String into a Number

abstract fun parse(string: String): Number?

Tries to parse a String into a Number

open fun parse(string: String): Number?
open override fun parse(string: String): Number?

Tries to parse a String into a Number

open override fun parse(string: String): Number?

Tries to parse a String into a Number