import org.apache.commons.lang3.StringUtils;
public static void main(String[] args) {
String str = StringUtils.leftPad("1234",5,"0");
System.out.println(str);
str = StringUtils.leftPad("12345",5,"0");
System.out.println(str);
str = StringUtils.stripStart("000245","0");
System.out.println(str);
}
image.png
网友评论