开发者

Convert BigDecimal to String for a check

开发者_运维问答

Is there a library or a call that will convert a BigDecimal value to a string to print on checks?

Example: 1323.03

One Thousand Three Hundred Twenty-Three Dollars and Three Cents

I have seen some examples that create a recursive function to do this but I was wondering if it was part of any standard library?


Look at this class EnglishNumberToWords that is doing what you want.


I'm pretty sure it does not exist as part of any standard library. It's just too rarely used and there are so many ways of doing it (e.g. your way only work for conversion into English of currency amount, assuming dollars and cents).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜