格式化

  • 补0
判断字符串长度,不够9位,在前面补0
String.format("%09d", Integer.valueOf("123"))
输出结果:000000123
分类: 字符串

0 条评论

发表回复

您的电子邮箱地址不会被公开。