摘要:
方法一:public static int indexOf (字符串/字符,int从第几位开始,int共查几位)string tests = "1absjjkcbfka2rsbcfak2bfka1"; //测试字符串int i = tests.IndexOf("2b",5,tests.Length-5); //查找从第五字符向后查找“2b”textBox2.Text = i.ToString();int i = tests.IndexOf("2b",5,2); //查找从第五字符向后查找两个字符是否有“2b”返回-1 表示未找到“2b 阅读全文