機能 |
データを指定サイズ分だけコピーする。 |
||||||
---|---|---|---|---|---|---|---|
定義 |
#include <string.h> void * memmove ( void * s1, const void * s2, size_t n ); |
||||||
引数 |
|
||||||
戻り値 | 引数s1を返す。 | ||||||
実装例 |
#include <string.h> #include <stdio.h> int main(void) { char str[10] = "12345"; memmove(&str[2], &str[0], 6); printf("%s\n", str); return 0; } |
||||||
実行結果 |
1212345 |
memmove()