string s = "--aBcd--eFaBce--";
Console.WriteLine(s.Trim('-'));//去除头尾‘-’字符
Console.WriteLine(s.PadLeft(12, '='));
Console.WriteLine(s.PadRight(12, '-'));
问题1:s.trim是去除头尾的‘-’字符,有没有去除中间的‘-’字符的命令啊?
问题2:s.padleft和s.padright分别填充左右字符,有没有填充中间的字符的命令啊?