uTools-Manuals/docs/c/setmem.html
2019-04-08 23:22:26 +08:00

35 lines
720 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1>字符串函数 - setmem</h1>
<p>原型extern void setmem(void *buf, unsigned int count, char ch);</p>
<p>用法:#include &lt;string.h></p>
<p>功能把buf所指内存区域前count个字节设置成字符ch。</p>
<p>说明返回指向buf的指针。</p>
举例:<pre>
// setmem.c
#include &lt;syslib.h>
#include &lt;string.h>
main()
{
char *s="Golden Global View";
clrscr();
setmem(s,6,'G');
printf("%s",s);
getchar();
return 0;
}
</pre>相关函数:<a href="bzero.html">bzero</a>,<a href="memset.html">memset</a>,<a href="strset.html">strset</a>