- Trim:删除头尾空格
- TrimStart:删除头部空格
- TrimEnd:删除尾部空格
如果这3个函数带上任意字符类型的参数,则删除字符组中出现的任意字符
例如:
string s = "from china where ca";
s = s.TrimEnd('where ca');
//输出结果:from in
如果这3个函数带上任意字符类型的参数,则删除字符组中出现的任意字符
例如:
string s = "from china where ca";
s = s.TrimEnd('where ca');
//输出结果:from in