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.

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.

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 backed by the ECMAScript Intl.NumberFormat API, shared by the JS family (js + wasmJs) via typed Intl externals.

Pattern, scientific and permillage styles aren't directly representable in Intl.NumberFormat — they're handled by composing native locale data (separators, currency symbols) with manual formatting/parsing.

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)
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)
actual constructor(locale: KalugaLocale, style: NumberFormatStyle)

Properties

Link copied to clipboard
actual open override var alwaysShowsDecimalSeparator: Boolean

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

actual open override var alwaysShowsDecimalSeparator: Boolean

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

expect open override var alwaysShowsDecimalSeparator: Boolean

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

actual open override var alwaysShowsDecimalSeparator: Boolean

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

actual open override var alwaysShowsDecimalSeparator: Boolean

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

actual open override var alwaysShowsDecimalSeparator: Boolean

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

Link copied to clipboard
actual open override var currencyCode: String

The ISO 4217 currency code of this currency

actual open override var currencyCode: String

The ISO 4217 currency code of this currency

expect open override var currencyCode: String

The ISO 4217 currency code of this currency

actual open override var currencyCode: String

The ISO 4217 currency code of this currency

actual open override var currencyCode: String

The ISO 4217 currency code of this currency

actual open override var currencyCode: String

The ISO 4217 currency code of this currency

Link copied to clipboard
actual open override var currencyDecimalSeparator: Char

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

actual open override var currencyDecimalSeparator: Char

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

expect open override var currencyDecimalSeparator: Char

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

actual open override var currencyDecimalSeparator: Char

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

actual open override var currencyDecimalSeparator: Char

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

actual open override var currencyDecimalSeparator: Char

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

Link copied to clipboard
actual open override var currencySymbol: String

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

actual open override var currencySymbol: String

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

expect open override var currencySymbol: String

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

actual open override var currencySymbol: String

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

actual open override var currencySymbol: String

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

actual open override var currencySymbol: String

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

Link copied to clipboard
actual open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

actual open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

expect open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

actual open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

actual open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

actual open override var decimalSeparator: Char

The symbol used to represent a decimal separator.

Link copied to clipboard
actual open override var exponentSymbol: String

The symbol used to represent an exponent sign.

actual open override var exponentSymbol: String

The symbol used to represent an exponent sign.

expect open override var exponentSymbol: String

The symbol used to represent an exponent sign.

actual open override var exponentSymbol: String

The symbol used to represent an exponent sign.

actual open override var exponentSymbol: String

The symbol used to represent an exponent sign.

actual open override var exponentSymbol: String

The symbol used to represent an exponent sign.

Link copied to clipboard
actual open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

actual open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

expect open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

actual open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

actual open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

actual open override var groupingSeparator: Char

The symbol used to represent a grouping sign.

Link copied to clipboard
actual open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

actual open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

expect open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

actual open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

actual open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

actual open override var groupingSize: Int

The number of digits that will be grouped by groupingSeparator.

Link copied to clipboard
actual open override var infinitySymbol: String

The text used to represent infinity.

actual open override var infinitySymbol: String

The text used to represent infinity.

expect open override var infinitySymbol: String

The text used to represent infinity.

actual open override var infinitySymbol: String

The text used to represent infinity.

actual open override var infinitySymbol: String

The text used to represent infinity.

actual open override var infinitySymbol: String

The text used to represent infinity.

Link copied to clipboard
actual open override val locale: KalugaLocale
actual open override val locale: KalugaLocale
expect open override val locale: KalugaLocale

KalugaLocale used for formatting.

actual open override val locale: KalugaLocale
actual open override val locale: KalugaLocale
actual open override val locale: KalugaLocale
Link copied to clipboard
actual open override var minusSign: Char

The symbol used to represent a minus sign.

actual open override var minusSign: Char

The symbol used to represent a minus sign.

expect open override var minusSign: Char

The symbol used to represent a minus sign.

actual open override var minusSign: Char

The symbol used to represent a minus sign.

actual open override var minusSign: Char

The symbol used to represent a minus sign.

actual open override var minusSign: Char

The symbol used to represent a minus sign.

Link copied to clipboard
actual open override var multiplier: Int

The value a number will be multiplied with when formatted.

actual open override var multiplier: Int

The value a number will be multiplied with when formatted.

expect open override var multiplier: Int

The value a number will be multiplied with when formatted.

actual open override var multiplier: Int

The value a number will be multiplied with when formatted.

actual open override var multiplier: Int

The value a number will be multiplied with when formatted.

actual open override var multiplier: Int

The value a number will be multiplied with when formatted.

Link copied to clipboard
actual open override var negativePrefix: String

Text to be added in front of the number when negative

actual open override var negativePrefix: String

Text to be added in front of the number when negative

expect open override var negativePrefix: String

Text to be added in front of the number when negative

actual open override var negativePrefix: String

Text to be added in front of the number when negative

actual open override var negativePrefix: String

Text to be added in front of the number when negative

actual open override var negativePrefix: String

Text to be added in front of the number when negative

Link copied to clipboard
actual open override var negativeSuffix: String

Text to be added behind the number when negative

actual open override var negativeSuffix: String

Text to be added behind the number when negative

expect open override var negativeSuffix: String

Text to be added behind the number when negative

actual open override var negativeSuffix: String

Text to be added behind the number when negative

actual open override var negativeSuffix: String

Text to be added behind the number when negative

actual open override var negativeSuffix: String

Text to be added behind the number when negative

Link copied to clipboard
actual open override var notANumberSymbol: String

The text used to represent a Not a Number value.

actual open override var notANumberSymbol: String

The text used to represent a Not a Number value.

expect open override var notANumberSymbol: String

The text used to represent a Not a Number value.

actual open override var notANumberSymbol: String

The text used to represent a Not a Number value.

actual open override var notANumberSymbol: String

The text used to represent a Not a Number value.

actual open override var notANumberSymbol: String

The text used to represent a Not a Number value.

Link copied to clipboard
actual open override var percentSymbol: Char

The symbol used to represent a percent sign.

actual open override var percentSymbol: Char

The symbol used to represent a percent sign.

expect open override var percentSymbol: Char

The symbol used to represent a percent sign.

actual open override var percentSymbol: Char

The symbol used to represent a percent sign.

actual open override var percentSymbol: Char

The symbol used to represent a percent sign.

actual open override var percentSymbol: Char

The symbol used to represent a percent sign.

Link copied to clipboard
actual open override var perMillSymbol: Char

The symbol used to represent a permille sign.

actual open override var perMillSymbol: Char

The symbol used to represent a permille sign.

expect open override var perMillSymbol: Char

The symbol used to represent a permille sign.

actual open override var perMillSymbol: Char

The symbol used to represent a permille sign.

actual open override var perMillSymbol: Char

The symbol used to represent a permille sign.

actual open override var perMillSymbol: Char

The symbol used to represent a permille sign.

Link copied to clipboard
actual open override var positivePrefix: String

Text to be added in front of the number when positive

actual open override var positivePrefix: String

Text to be added in front of the number when positive

expect open override var positivePrefix: String

Text to be added in front of the number when positive

actual open override var positivePrefix: String

Text to be added in front of the number when positive

actual open override var positivePrefix: String

Text to be added in front of the number when positive

actual open override var positivePrefix: String

Text to be added in front of the number when positive

Link copied to clipboard
actual open override var positiveSuffix: String

Text to be added behind the number when positive

actual open override var positiveSuffix: String

Text to be added behind the number when positive

expect open override var positiveSuffix: String

Text to be added behind the number when positive

actual open override var positiveSuffix: String

Text to be added behind the number when positive

actual open override var positiveSuffix: String

Text to be added behind the number when positive

actual open override var positiveSuffix: String

Text to be added behind the number when positive

Link copied to clipboard
actual open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

actual open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

expect open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

actual open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

actual open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

actual open override var usesGroupingSeparator: Boolean

When set to true number grouping is applied

Link copied to clipboard
actual open override var zeroSymbol: Char

The symbol used to represent a zero sign.

actual open override var zeroSymbol: Char

The symbol used to represent a zero sign.

expect open override var zeroSymbol: Char

The symbol used to represent a zero sign.

actual open override var zeroSymbol: Char

The symbol used to represent a zero sign.

actual open override var zeroSymbol: Char

The symbol used to represent a zero sign.

actual open override var zeroSymbol: Char

The symbol used to represent a zero sign.

Functions

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

Formats a Number into a String.

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

Formats a Number into a String.

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

Formats a Number into a String.

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

Formats a Number into a String.

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

Formats a Number into a String.

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

Formats a Number into a String.

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

Tries to parse a String into a Number

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

Tries to parse a String into a Number

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

Tries to parse a String into a Number

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

Tries to parse a String into a Number

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

Tries to parse a String into a Number

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

Tries to parse a String into a Number