move(), copymemory()
move()
var
buf1,buf2: array[0..9] of AnsiChar;
begin
buf1 := '0123456789';
buf2 := 'abcdefghij';
Move(buf2[2], buf1[4], 5);
ShowMessage(buf1); {0123cdefg9}
ShowMessage(buf2); {abcdefghij}
end;
copymemory()
var
buf1,buf2: array[0..9] of AnsiChar;
begin
buf1 := '0123456789';
buf2 := 'abcdefghij';
CopyMemory(@buf2[2], @buf1[4], 5);
ShowMessage(buf1); {0123456789}
ShowMessage(buf2); {ab45678hij}
end;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/archive/2008/11/17/2940800.html