var str= ",2,3,4,6,7,"; var str2 = str.Trim(new char[] { ‘,‘ }); //去除字符串str两端的‘,‘字符。 //则str2 为:"2,3,4,6,7"
C# Trim方法去除字符串两端的指定字符,布布扣,bubuko.com
C# Trim方法去除字符串两端的指定字符
原文:http://www.cnblogs.com/seacher/p/3928233.html