char * strcpyTest(char *dst,const char *src);
Action()
{
char *ptr=(char*)malloc(100);
char a[]={"this is a string..."};
char * result=strcpyTest(ptr,a);
lr_output_message("%s",result);
return 0;
}
char * strcpyTest(char *dst,const char *src)
{
char *res=dst;
if(dst!=NULL && src!=NULL)
{
while(*src!='\0')
{
*dst++=*src++;
}
}
else
{
lr_output_message("dst 或者src非法,请检查");
}
return res;
}