char* strcpy(char *to, const char *from)
{
assert(to != NULL && from != NULL);
char *p = to;
while ((*p++ = *from++) != '\0')
;
return to;
}
自己动手写C语言库函数(5)strcpy
最新推荐文章于 2025-05-02 15:44:47 发布
char* strcpy(char *to, const char *from)
{
assert(to != NULL && from != NULL);
char *p = to;
while ((*p++ = *from++) != '\0')
;
return to;
}