nxt.numerals

Conversions between integral values and numerals.

Members

Aliases

toTextual
alias toTextual = toNumeral
Undocumented in source.

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

Manifest constants

englishNumeralsMap
enum englishNumeralsMap;
Undocumented in source.
onesNumerals
enum onesNumerals;
Undocumented in source.
singleWords
enum singleWords;
Undocumented in source.
tensNumerals
enum tensNumerals;
Undocumented in source.

Static variables

_onesPlaceWordsAA
ubyte[string] _onesPlaceWordsAA;
Undocumented in source.

Meta