Skip to main content

plural_s

No overview available.

def plural_s(
word: string,
count: integer
) - > string

Appends an 's' to a word if the provided count is not equal to one, facilitating basic grammatical pluralization for display strings.

Parameters

NameTypeDescription
wordstringThe singular form of the noun to be potentially pluralized.
countintegerThe numerical value used to determine if the word should be pluralized; any value other than 1 triggers the suffix.

Returns

TypeDescription
stringThe original word if the count is 1, otherwise the word with an 's' appended.