标签:利用 char index temp replace string c# class blog
利用split 和递归做的
private int search(string strValue, char[] searchchar, int index) { var temp = strValue.Split(searchchar[index]); var countt = temp.Count(); if (countt > 1) { ++index; if (temp[0].Length > 0) { if (index < searchchar.Length) index = search(strValue.Replace(temp[0], ""), searchchar, index); } else { if (index < searchchar.Length) index = search(temp[1], searchchar, index); } } return index; }
感觉还行:)
返回值是匹配程度全。
标签:利用 char index temp replace string c# class blog
原文地址:http://www.cnblogs.com/aoldman/p/7762623.html