标签:MF details csdn \n lan class sdn ababc targe
void mystrstr(char *sub,char *str){ int i; if(*sub){ while(*str){ for(i=0;*(str+i)==*(sub+i);i++){ if(!*(sub+i+1)) printf("%s\n","match"); } str++; } }else{ printf("%s\n","match"); } } void main(){ char *sub="abc"; char *str="abababc"; mystrstr(sub,str); }
参考:https://blog.csdn.net/smf0504/article/details/51372073
标签:MF details csdn \n lan class sdn ababc targe
原文地址:https://www.cnblogs.com/stellar/p/8883217.html