strncpy documentation question

后端 未结 6 1624
傲寒
傲寒 2020-12-10 07:47

At the following regarding strncpy: http://www.cplusplus.com/reference/clibrary/cstring/strncpy/, it mentions the following:

No null-char

6条回答
  •  悲哀的现实
    2020-12-10 08:19

    That means that it copies the terminating null of the source string, but doesnt add a terminating null if the source string doesnt fit into the destination.

提交回复
热议问题