日期:2014-05-17 浏览次数:21087 次
string s = " abc esdf ";
char[] sz = { ' ', 'e' };
string snew = s.Trim(sz);
Console.WriteLine(snew+","+s);
string s = " eabc esdfe ";
char[] sz = { ' ', 'e' };
string snew = s.Trim(sz);
Console.WriteLine(snew+","+s);
string s = " abc esdf ";
char[] sz = { ' ', 'e' };
string[] snew = s.Split(sz, StringSplitOptions.RemoveEmptyEntries);
foreach (string item in snew)
{
Console.WriteLine(item);
}
string s = " abc esdf ";