|
|
@@ -8,11 +8,11 @@ public class NumToWords {
|
|
|
System.out.println(NumToWords.parse("11232192.23123"));
|
|
|
}
|
|
|
//10以内的数字
|
|
|
- private static final String[] SINGLE_NUM_ARR = new String[] { "", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine" };
|
|
|
+ private static final String[] SINGLE_NUM_ARR = new String[] { "", "ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE" };
|
|
|
//十几的数字
|
|
|
- private static final String[] TEN_NUM_ARR = new String[] { "Ten", "Eleven", "Tweleve", "Thirteen", "Fourteen", "Fifteen", "Sixteen","Seventeen", "Eighteen", "Nineteen" };
|
|
|
+ private static final String[] TEN_NUM_ARR = new String[] { "TEN", "ELEVEN", "TWELEVE", "THIRTEEN", "FOURTEEN", "FIFTEEN", "SIXTEEN","SEVENTEEN", "EIGNTEEN", "NINRTEEN" };
|
|
|
//整十的数字
|
|
|
- private static final String[] TEN_INTEGER_ARR = new String[] { "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety" };
|
|
|
+ private static final String[] TEN_INTEGER_ARR = new String[] { "TEN", "TWENTY", "THIRTY", "FORTY", "FIFTY", "SIXTY", "SEVENTY", "EIGHTY", "NINETY" };
|
|
|
|
|
|
public static String parse(String x) {
|
|
|
if(Double.parseDouble(x) <= 0){
|