function HexToString(S: string): string; var i: integer; Begin Result := ''; for i := 1 to Length( S ) do begin if ((i mod 2) = 1) then Result := Result + Chr( StrToInt( '0x' + Copy( S, i, 2 ))); end; end; ======================================= function StringToHex(S: string): string; var i: integer; Begin Result := ''; for i := 1 to Length( S ) do Result := Result + IntToHex( Ord( S[i] ), 2 ); end;
function HexToString(S: string): string;
var i: integer;
Begin
Result := '';
for i := 1 to Length( S ) do
begin
if ((i mod 2) = 1) then
Result := Result + Chr( StrToInt( '0x' + Copy( S, i, 2 )));
end;
end;
=======================================
function StringToHex(S: string): string;
var i: integer;
Begin
Result := '';
for i := 1 to Length( S ) do
Result := Result + IntToHex( Ord( S[i] ), 2 );
end;