delphi中BYTE數組和String之間怎樣相互轉換?
var
arrBYTE: array[0..2] of Byte;
str1: string;
i: Integer;
begin
for i := 0 to Length(arrbyte)-1 do
str := str + IntToStr(arrbyte[i]);//byte[] to string;
for i := 0 to Length(str)-1 do
arrbyte[i] := Byte(str[i]);//string to byte[]
StrCopy(PChar(@arrbyte),PChar(str));//string to byte[]
end;
上一篇晉江怎么上傳封面