Ordinal Suffix

Pure
OrdinalSuffix

Returns the ordinal suffix for an integer: 'st', 'nd', 'rd', or 'th'. Correctly handles edge cases like 11th, 12th, and 13th.

Type: Pure (no side effects)
Category: Fortuna|String & Text
Keywords: string & text

Inputs

NameTypeDefaultDescription
Numberint32Number parameter

Outputs

NameTypeDescription
ReturnValueFStringReturnValue output

Example Use Cases

Example 1

Display '1st Place', '2nd Place' on a leaderboard.

Example 2

Format wave numbers as '3rd Wave' in a survival game.