java-money format
static String num2money(String money,int length){
String r="";
String endOfBacket="";
if(money.indexOf("-")>=0){
money=money.replace("-","");money="("+money;endOfBacket=")";
}
money=" "+money;
money=money.substring(money.length()-11,money.length())+endOfBacket;
r=money;
return r;
}
沒有留言:
張貼留言