case "5": tmpnewchar="伍" + tmpnewchar ;break; case "6": tmpnewchar="陆" + tmpnewchar ;break; case "7": tmpnewchar="柒" + tmpnewchar ;break; case "8": tmpnewchar="捌" + tmpnewchar ;break; case "9": tmpnewchar="玖" + tmpnewchar ;break; } if(i==0)tmpnewchar =tmpnewchar + "角"; if(i==1)tmpnewchar = tmpnewchar + "分"; newchar = newchar + tmpnewchar; } } //替换所有无用汉字 while(newchar.search("零零") != -1) newchar = newchar.replace("零零", "零"); newchar = newchar.replace("零亿", "亿"); newchar = newchar.replace("亿万", "亿"); newchar = newchar.replace("零万", "万"); newchar = newchar.replace("零元", "元"); newchar = newchar.replace("零角", ""); newchar = newchar.replace("零分", ""); if (newchar.charAt(newchar.length-1) == "元" || newchar.charAt(newchar.length-1) == "角") |
正在阅读:将金额小写转化成汉字大写的实现过程将金额小写转化成汉字大写的实现过程
2004-02-14 09:34
出处:CSDN
责任编辑:linjixiong
键盘也能翻页,试试“← →”键