数字转字符串自动补零

// 自动补零
code = String.format("%0" + numLength + "d", currentValue);

numLength :总长度
currentValue :数值

 

posted @ 2022-06-10 13:47  二次元的程序猿  阅读(295)  评论(0)    收藏  举报