摘要:
#include<stdio.h>#include<stdlib.h>#include<string.h>/*naive string-matching algorithm,T为原始字符串,P为需要匹配的字符串*/void naiveMatch(char *T,char *P){ int lenT,lenP,i,j; lenT=strlen(T); lenP=strlen(P); if(lenT<lenP)/*需要匹配的字符串比原始字符串还要长出错*/ { perror("input error"); return ; } for( 阅读全文