摘要:
方法一:string test = "FF FF FF FF 01 00 82 00 00 A2 00 00 FB 07 FF FF FF FF 01 00 82 00 00 A2 00 00 FB 07";string r = test.Replace("FF FF FF FF","");int num = (test.Length - r.Length) /11; //(11是'FF FF FF FF'的长度)Response.Write(num);方法二:string aaa = "aabaabbaab 阅读全文