字符串的截取(从指定位置)

string s = "1234abc123444555efcdeeee";
            int i = s.IndexOf("abc")+1;
            int j = s.IndexOf("ef");
            string str = s.Substring(i, j - i+2);

 



str结果为:abc123444555ef,

posted @ 2016-05-16 15:48  咧嘴玩手机的猫  阅读(496)  评论(0)    收藏  举报