Plural

data class Plural(val resource: PluralStringResource, val count: Int, val args: List<Any> = listOf(count)) : UiText(source)

A plurals resource selected by count.

args are the format arguments substituted into the chosen item. They default to [count], which is the common case ("3 countries selected"), but a plural can carry more — an error whose digit count decides singular/plural while the message also names the country and its dial code, for example.

Constructors

Link copied to clipboard
constructor(resource: PluralStringResource, count: Int, args: List<Any> = listOf(count))

Properties

Link copied to clipboard
val args: List<Any>
Link copied to clipboard
val count: Int
Link copied to clipboard
val resource: PluralStringResource

Functions

Link copied to clipboard

Resolves this UiText against the current composition's resources.