Method ToOrdinal
ToOrdinal(string)
Convert a number to its ordinal representation.
Declaration
public static string ToOrdinal(string number)
Parameters
| Type | Name | Description |
|---|---|---|
| string | number |
Returns
| Type | Description |
|---|---|
| string |
Remarks
The YACC.Utils namespace is used to provide a set of helper methods, the class needs to be statically called and it's not meant to be instantiated.
Examples
using YACC;
public class Odometer : MonoBehaviour {
string selectedGear;
void Update() {
selectedGear = Utils.ToOrdinal("1"); // returns "1st"
}
}