//by linsl 2008-07-23 轉化格式#.##function numtoch(num)
var num_ch=new array("零","壹","貳","叄","肆","伍","陸","柒","捌","玖");
var z_unit=new array("元","拾","佰","仟","萬","拾","佰","仟","億","拾","佰","仟");
var point=new array("角","分","釐");
//整數部分資料處理
for(var i=0;i1)
for(var i=0;i}
//轉化後的字串處理
for(i=0;i<4;i++)
if(ch_str.substring(ch_str.length-1)==("零"))
ch_str=ch_str.substring(0,ch_str.length-1)+"整";
if(ch_str=="元整")
ch_str="零元整";
return ch_str;
}
金額數字轉換到大寫
package test public class testswing private final static string cpattern private final static string cfpattern private final static string zeor 零 publ...
金額數字轉中文大寫
public class moneyutil 整數部分的單位 private static final string iunit 小數部分的單位 private static final string dunit 得到大寫金額。public static string tochinese strin...
金額數字轉大寫中文
將數字轉為大寫 public string moneytochinese string lowermoney string strlower null string strupart null string strupper null int itemp 0 保留兩位小數 123.489 123.4...