What's the difference between strcpy and stpcpy?

后端 未结 6 941
不知归路
不知归路 2021-01-01 12:57

While reading the man page for strcpy, I discovered the function stpcpy also exists. However, the only difference I could notice in the man page is

6条回答
  •  孤城傲影
    2021-01-01 13:32

    The other difference is the return value. From the man page: "The strcpy() and strncpy() functions return s1. The stpcpy() function returns a pointer to the terminating `\0' character of s1."

提交回复
热议问题