string abcgggefg ;
把最后一个 g 过滤掉。
过滤最后一个字符。。。。 前面的数据有重复的不能过滤。 每次 只过滤最后一个 字符。
------解决方案--------------------------------------------------------
删除?
- C# code
string str = "abcgggefg"; int i = str.LastIndexOf("g"); str = str.Remove(i, 1);
string str = "abcgggefg"; int i = str.LastIndexOf("g"); str = str.Remove(i, 1);