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;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/archive/2012/11/15/2772295.html