Wolfram Research

Function Repository Resource:

OrdinalNumberString

Source Notebook

Convert integers to strings representing ranks: 1st, 2nd, 3rd, etc.

Contributed by: Jon McLoone

ResourceFunction["OrdinalNumberString"][n]

generates a string representing the ordering position n ("1st", "2nd", "3rd", etc).

Examples

Basic Examples

The first ordinal:

In[1]:=
ResourceFunction["OrdinalNumberString"][1]
Out[1]=

Scope

All positive integers are supported:

In[2]:=
Table[ResourceFunction["OrdinalNumberString"][i], {i, 103}]
Out[2]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

License Information