忽略字母大小写,下面是我当时写的代码,求各位大婶指教怎么改进不会让人觉得缺经验,或者贴下你的代码,感谢
{
if((s1==null)||(s2==null))
exit(1);
int c='a'-'A',i=0;
char *temps1=s1,*temps2=s2;
while(*temps1!='\0')
{
int i1=0;
while((*temps1==*temps2)||({*temps1+c)==*temps2)||(*temps1==(*temps2+c)))
{
temps1++;
temps2++;
if('\0'==*temps2)
return (s1+i-i1);
i++;
i1++;
}
temps2=s2;
temps1++;
i++;
}
return null;
}