《Linux函数调用手册》之___strncat连接两字符串
定义:
char * strncat(char *dest,const char *src,size_t n);
表头文件:
#include <string.h>
说明:
strncat()会将参数src字符串拷贝n个字符到参数dest所指的字符串尾。第一个参数dest要有足够的空间来容纳要拷贝的字符串。
返回值:
返回参数dest的字符串起始地址。
相关函数:
bcopy, memccpy, memecpy, strcpy, strncpy
示例:
执行:
before strnact() : string(1)
after strncat() : string(1) string
返回顶部 | 《Linux函数调用大全》 | 《Linux命令大全》 | Linux专栏