void get_nextval(char s[],int nextval[])//求模式串S的nextval函数值并存入到nextval[]中 { int i=0,j=-1; nextval[0]=-1; while(i