补位 string str = "10"; str.PadLeft(5,'0') 输出:00010 str.PadRight(5, '0') 输出:10000 转载于:https://www.cnblogs.com/xiaonangua/p/11498969.html