mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-08 23:14:06 +08:00
35 lines
752 B
HTML
35 lines
752 B
HTML
<h1>字符串函数 - strset</h1>
|
||
|
||
|
||
<p>原型:extern char *strset(char *s, char c);</p>
|
||
|
||
<p>用法:#include <string.h></p>
|
||
|
||
<p>功能:把字符串s中的所有字符都设置成字符c。</p>
|
||
|
||
<p>说明:返回指向s的指针。</p>
|
||
|
||
举例:<pre><code class="language-c">
|
||
|
||
|
||
// strset.c
|
||
|
||
#include <syslib.h>
|
||
#include <string.h>
|
||
|
||
main()
|
||
{
|
||
char *s="Golden Global View";
|
||
|
||
clrscr();
|
||
|
||
strset(s,'G');
|
||
printf("%s",s);
|
||
|
||
getchar();
|
||
return 0;
|
||
}
|
||
|
||
</code></pre>相关函数:<a href="bzero.html">bzero</a>,<a href="memset.html">memset</a>,<a href="setmem.html">setmem</a>
|
||
|