字符串匹配,失败时回溯。。
void getNext(char needle[], int next[]); int kmp(char needle[], char haystack[], int next[]); int main() { char needle[255] = {'