Algorithm that converts numeric amount into English words

后端 未结 9 1040
眼角桃花
眼角桃花 2020-12-13 21:44

What is the most efficient way to convert numeric amount into English words

e.g. 12 to twelve 127 to one hundred twenty-seven

9条回答
  •  旧时难觅i
    2020-12-13 21:57

    This is part of Common Lisp!

    Here's how GNU CLISP does it, and here's how CMUCL does it (easier to read, IMHO).

    Doing a code search for "format million billion" will turn up lots of them.

提交回复
热议问题