Package-level declarations

Functions

Link copied to clipboard

Returns the English ordinal suffix for an Int ("st", "nd", "rd", "th"). Example: 1.ordinalSuffix() → "st" Example: 11.ordinalSuffix() → "th"

Link copied to clipboard

Returns the full ordinal string for an Int. Example: 1.toOrdinal() → "1st" Example: 22.toOrdinal() → "22nd" Example: 113.toOrdinal() → "113th"

Link copied to clipboard

Returns the written-out ordinal word for numbers 1–20. Falls back to numeric ordinal (e.g. "21st") for larger values. Example: 3.toOrdinalWord() → "third" Example: 25.toOrdinalWord() → "25th"

Link copied to clipboard

Converts an Int to its spelled-out English word. Supports -999 to 999. Example: 42.toWord() → "forty-two"