c# PadLeft,PadRight用法

补位

string str = "100";

str.PadLeft(5,'0')

输出:00100

str.PadRight(5, '0')

输出:10000

 

posted on 2016-10-11 16:26  淡泊以修身,宁静以养性  阅读(23562)  评论(0编辑  收藏  举报

导航