PadLeft函数

string num=12

num.PadLeft(4, '0'); //结果为为 '0012'

看字符串长度是否满足4位,不满足则在字符串左边以"0"补足

原文地址:https://www.cnblogs.com/shy1766IT/p/5184937.html