String.Remove

String.Remove方法注意事项:

1、该方法不改变元字符串;

2、str  = ‘’; str.Remove(str.Length-3);明显超限,但是不报错,返回值为'';

  str = '1234'; str.Remove(str.Length-5);明显超限,不报错,返回‘1234’;

也就是说,超出字符串个数的去除,Remove方法不会报错,但是会原封不动的返回元字符串;

posted on 2013-12-19 10:28  TERONY  阅读(710)  评论(1编辑  收藏  举报