标签:TE har while strcat turn amp cat += lse
char * strcatTest(char *dst,const char *src);
Action()
{
char a[]="come on";
char b[]="every one";
char * result=strcatTest(a,b);
lr_output_message("%s",result);
return 0;
}
char * strcatTest(char *dst,const char *src)
{
char *res=dst;
if(dst!=NULL && src!=NULL)
{
while(*dst!=‘\0‘)
{
*dst++;
}
*dst++=‘-‘;
while(*src!=‘\0‘)
{
*dst++=*src++;
}
}
else
{
lr_output_message("dst 或者src非法,请检查");
}
return res;
}
标签:TE har while strcat turn amp cat += lse
原文地址:https://www.cnblogs.com/NiceTime/p/9192612.html