Change the form of words. Includes "inflect" and "ordinalize".
inflect
Returns the plural or singular form of a word based on a count.
Parameters
singular [string] - The singular form of the word. (Required)
plural [string] - The plural form of the word. (Required)
include [boolean] - whether or not to include the count before the word. (Optional)
Example
enemies = 5
friends = 1
{{inflect enemies "enemy" "enemies"}}
{{inflect friends "friend" "friends" true}}
Result
enemies
1 friend
ordinalize
Turns a number into an ordinal string.
Parameters
None
Example
{{ordinalize 3}}
{{ordinalize 1}}
{{ordinalize 22}}
Result
3rd
1st
22nd
Last modified on May 31, 2022