quantity

fun String.quantity(quantity: Int, stringLoader: StringLoader = DefaultStringLoader(), defaultValue: String = this): String

Treats this string as a resource identifier for a plural string format String and formats given value using associated format String

Return

The String associated with the identifier represented by this String, or defaultValue if no such String could be found.

Parameters

quantity

The Int value to be pluralize

stringLoader

The StringLoader used for loading the associated String resource.

defaultValue

The String to return if no match was found for the identifier. Defaults to this.