We currently have a crude mechanism to convert numbers to words (e.g. using a few static arrays) and based on the size of the number translating that into an english text. But we are running into issues for numbers which are huge.
10183 = Ten thousand one hundred eighty three
90 = Ninety
5888 = Five thousand eight hundred eighty eight
Is there an easy to use function in any of the math libraries which I can use for this purpose?
Here is the code, I don’t think there is any method in SE.
It basically converts number to string and parses String and associates it with the weight
for example
1is treated as thousand position and1gets mapped to"one"and thousand because of positionThis is the code from the website:
English
Français
Quite different than the english version but french is a lot more difficult!
You can handle “dollar and cent” conversion by calling the “convert” method two times.
Another way to use a built-in function of your DBMS (if available).
For Oracle