
1 #include"iostream" 2 using namespace std; 3 4 bool MatchCore(char*str,char* pattern); 5 6 bool Match(char* str,char* pattern) 7 { 8 if(str==nullptr||pattern==nullptr) 9 return false; 10 return MatchCore(str,pattern); 11 } 12 13 bool MatchCore(char*str,char* pattern) 14 { 15 if(*str=='