Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4625fbefed | ||
|
|
d7e971f32d |
@@ -1088,7 +1088,8 @@ public class Utils {
|
||||
DecimalFormat decimalFormat=new DecimalFormat(f);//构造方法的字符格式这里如果小数不足2位,会以0补足.
|
||||
String p=decimalFormat.format(d);//format 返回的是字符串
|
||||
if(p.split("\\.")[0].length()<1) p="0"+p;
|
||||
String nn = p.split("\\.")[1];
|
||||
String nn ="0";
|
||||
if(p.split("\\.").length>1) nn = p.split("\\.")[1];
|
||||
if(!x){
|
||||
if(nn.replaceAll("0", "").length()<1) p=p.split("\\.")[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user