nxt.numerals

Conversions between integral values and numerals.

Members

Functions

fromEnglishOrdinalTo
T fromEnglishOrdinalTo(const(char)[] ordinal)

Get English ordinal number of unsigned integer n.

fromNumeral
Nullable!long fromNumeral(S x)

Convert the number number to its English textual representation. Opposite: toNumeral. TODO Throw if number doesn't fit in long. TODO Add variant to toTextualBigIntegerMaybe. TODO Could this be merged with to!(T)(string) if (isInteger!T) ?

isEnglishAtomicNumeral
bool isEnglishAtomicNumeral(S s)

Check if c is an English atomic numeral.

toEnglishOrdinal
string toEnglishOrdinal(T n, string defaultOrdinal)

Get English ordinal number of unsigned integer n default to defaultOrdinal if n is too large.

toNumeral
string toNumeral(T number, string minusName)

Convert the number number to its English textual representation (numeral) also called cardinal number. Opposite: fromNumeral

Meta