char* strcpy(char *to, const char *from)
{
assert(to != NULL && from != NULL);
char *p = to;
while ((*p++ = *from++) != '\0')
;
return to;
}
自己动手写C语言库函数(5)strcpy
最新推荐文章于 2018-10-03 13:07:42 发布
char* strcpy(char *to, const char *from)
{
assert(to != NULL && from != NULL);
char *p = to;
while ((*p++ = *from++) != '\0')
;
return to;
}