the important thing is not to stop questioning

导航

 

在 C# 中可以对字符串使用 PadLeft 和 PadRight 进行轻松地补位。

PadLeft(int totalWidth, char paddingChar) //在字符串左边用 paddingChar 补足 totalWidth 长度

PadLeft(int totalWidth, char paddingChar) //在字符串右边用 paddingChar 补足 totalWidth 长度

posted on 2015-12-22 17:01  qook  阅读(158)  评论(0编辑  收藏  举报