c# 字符补位 string item=1; item= item.PadLeft(4,'0');//4为位数 ‘0’为补的字符 输出 item=0001; item= item.PadRight(4,‘0’);//4是总位数 输出 item=1000;