move

procedure TForm1.Button1Click(Sender: TObject);
var
s, b: AnsiString;
a: array[0..9] of Byte;
begin
s := 'test';
FillChar(a, SizeOf(a), '');
Move(s[1], a, SizeOf(a));
SetLength(b, SizeOf(a) + 1);
Move(a, b[1], SizeOf(a));
Caption := b;
end;

你可能感兴趣的:(move)