标签:左补0
String str="80";
String formatStr=String.format("%04d", Integer.parseInt(str));
System.out.println(formatStr);
String strs = "1290i18";
String str2 = String.format("%10s", strs).replace(‘ ‘, ‘0‘);
System.out.println(str2);
标签:左补0
原文地址:http://5618698.blog.51cto.com/5608698/1617135