Spell Out Numbers
Features
Writes put the name of a number given in different languages. Currently only English is supported, but in the future I will add more languages. If anyone is interested in helping me with that, feel free to contact me / open an issue.
Language Support
x
English
Usage
There is one abstract class (LanguageNumberScheme
) that all
other classes inherit from. This class and all classes extending
this one provide amongst others the following methods and getters:
toWord(num number)
: converts the number given into wordsnum get maxNumber;
: the largest number supported by the schemeint get maxDecimals;
: the maximum number of decimal values
Examples
LanguageNumberScheme scheme = EnglishNumberScheme();
print(scheme.toWord(10));
// ten
LanguageNumberScheme scheme = EnglishNumberScheme();
print(scheme.toWord(-1398));
// minus one thousand three hundred ninety eight