这篇文章主要介绍了c语言实现的带通配符匹配算法,需要的朋友可以参考下
原创代码。
‘?’代表任意单个字符,‘*’代表任意0个或多个字符。常用于文件的搜素匹配。
bool MatchWithAsteriskW(wchar_t* str1, wchar_t* pattern) { if (str1 == NULL) return false; if (pattern == NULL) return false; int len1 = lstrlenW(str1); int len2 = lstrlenW(pattern); int mark = 0;//用于分段标记,'*'分隔的字符串 int p1 = 0, p2 = 0; while (p1<len1 && p2
以上所述就是本文的全部内容了,希望大家能够喜欢。
以上就是c语言实现的带通配符匹配算法来源gao@!dai!ma.com搞$$代^@码!网的详细内容,更多请关注gaodaima搞代码网其它相关文章!