List of utility methods to do Number to Word
String | numberToWord(long number) number To Word if (number == 0) { return "zero"; if (number < 0) { return "-" + numberToWord(Math.abs(number)); String words = ""; if ((number / 1000000000) > 0) { ... |
String | numberToWords(long value, boolean useAnd) Convert any long input value to a text representation if (value == 0L) return SUBTWENTY[0]; Integer[] thous = new Integer[SCALES.length]; boolean neg = value < 0; int scale = 0; while (value != 0) { thous[scale] = Math.abs((int) (value % 1000)); value = value / 1000; ... |