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

36 lines
871 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>字符串函数 - memmove</h1>
<p>原型extern void *memmove(void *dest, const void *src, unsigned int count);</p>
<p>用法:#include &lt;string.h></p>
<p>功能由src所指内存区域复制count个字节到dest所指内存区域。</p>
<p>说明src和dest所指内存区域可以重叠但复制后src内容会被更改。函数返回指向dest的指针。</p>
举例:<pre>
// memmove.c
#include &lt;syslib.h>
#include &lt;string.h>
main()
{
char *s="Golden Global View";
clrscr();
memmove(s,s+7,strlen(s)-7);
s[strlen(s)-7]=0;
printf("%s",s);
getchar();
return 0;
}
</pre>相关函数:<a href="memccpy.html">memccpy</a>,<a href="memcpy.html">memcpy</a>,<a href="strcpy.html">strcpy</a>