LocalizedStringNumber

data class LocalizedStringNumber @JvmOverloads constructor(var number: Number, val precision: Int = Int.MAX_VALUE, val tailingFractionZeros: Boolean = false) : AbstractLocalizedString

Provies locale specific formatting of numbers. e.g. "12.345,67"

Constructors

Link copied to clipboard
constructor(number: Number, precision: Int = Int.MAX_VALUE, tailingFractionZeros: Boolean = false)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class NumberFormattingInfo(val fractionSign: Char, val groupingSign: Char, val groupIntegerSize: Int, val groupFractionSize: Int)

Hold information to format a number

Properties

Link copied to clipboard

the number to be formatted

Link copied to clipboard

The position to which the rounding is to be made.

Link copied to clipboard

Add zeros after the fraction sign until digits count of precision is reached. Only if precision is greater than 0 and not Int.MAX_VALUE

Functions

Link copied to clipboard
open operator fun invoke(): String
open operator fun invoke(locale: Locale?): String

Shortcut for toString

Link copied to clipboard
open override fun toString(): String

return value based on the currently set Locale in i18n4k (I18n4kConfig.locale)

open override fun toString(locale: Locale?): String

return value based on the given Locale