Welcome

首页 / 软件开发 / C语言 / C字符串函数strset

C字符串函数strset2010-05-06原型:extern char *strset(char *s, char c);

用法:#include <string.h>

功能:把字符串s中的所有字符都设置成字符c。

说明:返回指向s的指针。

举例:

// strset.c

#include <syslib.h>
#include <string.h>
main()
{
char *s="Golden Global View";

clrscr();

strset(s,""G"");
printf("%s",s);
getchar();
return 0;
}

相关函数:bzero,memset,setmem