微信扫一扫
方法一:
preStr = preStr.Substring(0, preStr.Length - 1);
方法二:
preStr = preStr.TrimEnd('-');
两种方式的性能结果:
相关推荐