1.strcat
voidmycat(char*s1,char*s2)
{
while(*s1++);
s1--;
while(*s1++=*s2++);
}
2.strcpy
voidmycpy(char*s1,char*s2)
3.strcmp
intmycmp(char*s1,char*s2)
for(;*s==*t;s++,t++)
if(*s==0)return0;
return*s-*t;
4.strlen
intmylen(char*s1)
char*p=s1;
while(*p++);
returnp-s-1;
5.strlwr
char*strlwr(char*s)
{unsignedcharAL;
registerchar*DX,*SI;
DX=SI=s;
while((AL=*SI++)!="\0")
{AL-="A";
if(AL>"Z"-"A")continue;
SI[-1]+="a"-"A";
returnDX;
1.strcat
voidmycat(char*s1,char*s2)
{
while(*s1++);
s1--;
while(*s1++=*s2++);
}
2.strcpy
voidmycpy(char*s1,char*s2)
{
while(*s1++=*s2++);
}
3.strcmp
intmycmp(char*s1,char*s2)
{
for(;*s==*t;s++,t++)
if(*s==0)return0;
return*s-*t;
}
4.strlen
intmylen(char*s1)
{
char*p=s1;
while(*p++);
returnp-s-1;
}
5.strlwr
char*strlwr(char*s)
{unsignedcharAL;
registerchar*DX,*SI;
DX=SI=s;
while((AL=*SI++)!="\0")
{AL-="A";
if(AL>"Z"-"A")continue;
SI[-1]+="a"-"A";
}
returnDX;
}