删除字符串最后一个指定的字符,在VS2005中原来这么简单:
string str = "123,4,";
str 
= str.TrimEnd(',');
str 的值为:1234,4

TrimEnd 的详细使用方法可以参考:剪裁和移除字符

相关文章: