pluralize

fun String.pluralize(cnt: Int, suffix: String = "s"): String

Appends suffix to this String when cnt is not 1 (simple English pluralization).

Return

the original string if cnt is 1, otherwise the string with suffix appended

Parameters

cnt

the count to check

suffix

the suffix to append for plural form (default "s")