string str = "小王,小李,小张,";//获取字符串长度int length = str.length;//截取除最后一位的前面所有字符str = str.substring(0,length-1);
"小王,小李,小张,)".TrimEnd(',')
TrimEnd(',')