HumanNumber

Convert numbers into English-spoken strings

Download HumanNumber.java

The HumanNumber class provides a few static methods that turn numerical numbers into English-spoken strings.

Examples of Use

    // Format some ints or longs.
    String result = HumanNumber.format(0);
    result = HumanNumber.format(1);
    result = HumanNumber.format(12);
    result = HumanNumber.format(123);
    result = HumanNumber.format(1234);

    // Format a String (allows longer numbers to be formatted)
    result = HumanNumber.format("645635467684453453463455435");

The above examples return the following:

This class supports positive integers up to approximately 1065.

Licensing

This software product is OSI Certified Open Source Software, available under the GNU General Public License (GPL). Since the GPL may be too restrictive for use in proprietary applications, a commercial license is also provided.

Purchase a commercial license for this software.

 

Search this site

 

Copyright Paul Mutton 2001-2013
http://www.jibble.org/
Feedback welcomed
email

~
Dreamhost
Web Hosting

~
Dreamhost
Web Hosting