07/08/29 13:06:24
>>56
#include <stdio.h>
#include <string.h>
char *MojiSearch(char *m,char *s){
int i = 0;
int j = 0;
int result = 0;
while(i < strlen(m)-strlen(s)+1){
for(j=0;j<strlen(s);j++){
if(m[i+j] == s[j]){
result++;
}
else{
result = 0;
break;
}
}
if(result != 0)
break;
i++;
}
if(result == 0)
return NULL;
else
return &m[i];
}