Command-line Text to Number Converter on FreeWork Exchange

Command-line Text to Number Converter


Here is a fairly trivial task, to build a tool that takes the textual representation of a number as a command line argument and prints out the numeric representation of the same.

For example, let us assume the tool is called txt2num, then it will be called on the command-line with:
txt2num one thousand nine hundred and eighty one
It is expected to echo:
You may write this tool in any language you choose, as long as it can be executed freely on Windows, Linux and Mac.

Personally, I feel a task like this is a bad-fit for the platform, as it is unlikely to look good on anyone's resume (unless you solve it in a rather interesting way), but I put it here to get your thoughts on this. Do share them in the comments.

misc 7 years ago,

Please Sign-in or Register to solve this problem