字符串函数stpcpy
来源:互联网 发布:js中的是id选择器 编辑:程序博客网 时间:2024/05/17 00:02
原型:extern char *stpcpy(char *dest,char *src);
用法:#include <string.h>
功能:把src所指由NULL结束的字符串复制到dest所指的数组中。
说明:src和dest所指内存区域不可以重叠且dest必须有足够的空间来容纳src的字符串。
返回指向dest结尾处字符(NULL)的指针。
举例:
// stpcpy.c
#include <syslib.h>
#include <string.h>
main()
{
char *s="Golden Global View";
char d[20];
clrscr();
stpcpy(d,s);
printf("%s",d);
getchar();
return 0;
}
相关函数:strcpy
(摘自 http://www.ggv.com.cn/forum/clib/string/strstr.html)
用法:#include <string.h>
功能:把src所指由NULL结束的字符串复制到dest所指的数组中。
说明:src和dest所指内存区域不可以重叠且dest必须有足够的空间来容纳src的字符串。
返回指向dest结尾处字符(NULL)的指针。
举例:
// stpcpy.c
#include <syslib.h>
#include <string.h>
main()
{
char *s="Golden Global View";
char d[20];
clrscr();
stpcpy(d,s);
printf("%s",d);
getchar();
return 0;
}
相关函数:strcpy
(摘自 http://www.ggv.com.cn/forum/clib/string/strstr.html)
- 字符串函数stpcpy
- strcpy,stpcpy函数
- strcpy,stpcpy函数
- strncpy()函数,strcpy()函数,stpcpy()函数
- mempcpy、stpcpy和stpncpy的简介
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数
- 字符串函数memset
- 字符串函数movmem
- wingdows server 2003安装
- 字符串函数setmem
- resin 一台主机多个端口运行不同的网站或程序
- 字符串函数stpcpy
- sql server权限和数据类型
- 11
- 字符串函数strcat
- 字符串函数strchr
- 字符串函数strcmp
- 字符串函数stricmp,strcmpi
- CSS控制字体效果的思考
- 字符串函数strlen