output::ordinal -- ordinal
numbers
Introductionoutput::ordinal converts an integer to the
corresponding english ordinal number.
Call(s)output::ordinal(integer)
Parametersinteger |
- | integer |
Returnsa string with the english ordinal number
Related
Functions
Detailsoutput::ordinal converts an integer to the
corresponding english ordinal number. The return value is a string and
can be used in messages.
Example
1Convert some numbers to the corresponding english ordinal string:
>> map([0, 1, 2, 3, 4, 22, 134, 2001], output::ordinal)
["0th", "1st", "2nd", "3rd", "4th", "22nd", "134th", "2001st"]