Install-Package SoftCircuits.NumberToText
This repository has been deprecated. Please use SoftCircuits.Wordify instead.
Converts a number to text. For example, the library would convert 123.45
to "One hundred twenty-three and 45/100"
. Useful for check printing or other cases where you want to display a number as text.
NumberToText converter = new NumberToText();
string s = converter.Transform(123.45);
Note that negative numbers are converted to positive numbers before transforming. Therefore, 123.45
would product the same result for as for -123.45
. Depending on how you want negative numbers handled, you could prefix the result with "Minus"
or something to that effect when the value is a negative number.
For additional information, check the Converting Numbers to Words article on Black Belt Coder.