n.拷贝字符串
网络 字符串复制; 拷贝字符串; 串拷贝
These functions include strcpy(3), strcat(3), sprintf(3) (with cousin vsprintf(3)), and gets(3).
这些函数包括 strcpy(3)、strcat(3)、sprintf(3) (及其同类 vsprintf(3) )和 gets(3) 。
The strcpy function can be implemented using the "s" and "d" constraints in the following manner.
strcpy函数可以通过以下方式使用“ s ”和“ D ”约束来实现。
You also have to use the memalign function and strcpy to copy the data into an area of appropriate alignment.
另外,还需要使用 memalign 函数和 strcpy 将数据复制到合适对齐的区域。
The correct way to do this would be to use the strncpy function instead of strcpy , and give the maximum number of bytes to copy as BUFSIZ - 1.
复制的正确方法是用strncpy函数代替strcpy,并将要复制的最大字节数定为BUFSIZ - 1。
This means that switching from strcpy (3) to strncpy (3) can reduce performance — often not a serious problem on today´s computers, but it can still be a nuisance.
这意味着从strcpy(3)切换到strncpy(3)会降低性能——这在如今的计算机上通常不是一个严重的问题,但它仍然是有害的。