Hex --> String
Falk0ner, вс, 06/07/2008 - 15:34.
procedure TForm1.Button1Click(Sender: TObject);
const Source: string = '4D 5A';
var S: string;
t: Integer;
begin
with TStringList.Create do
try
Text := StringReplace(Source, #32, #13#10, [rfReplaceAll]);
S := '';
for t := 0 to Count - 1 do
S := S + Chr(StrToInt('$' + Strings[t]));
ShowMessage(S);
finally
Free;
end;
end;
const Source: string = '4D 5A';
var S: string;
t: Integer;
begin
with TStringList.Create do
try
Text := StringReplace(Source, #32, #13#10, [rfReplaceAll]);
S := '';
for t := 0 to Count - 1 do
S := S + Chr(StrToInt('$' + Strings[t]));
ShowMessage(S);
finally
Free;
end;
end;
Автор: Song
Взято из http://forum.sources.ru
Отправить комментарий