Delphi Tips Trick

For Newbie

Iklan Responsive Atas

LightBlog
Responsive Ads Here

Thursday, 3 November 2011

How to convert Hexadecimal to STRING in Delphi

This is the way How to convert Hexadecimal to STRING

hexa decimal to string delphi

How to convert Hexadecimal to STRING???

the value here below to convert described below

Example value :
HEXADECIMAL STRING RESULT
5349414E4F204D494348454C45 -> SIANO MICHELE

 the fuction is:


function HexToString(H: String): String;
var I : Integer;
begin
  Result:= '';
  for I := 1 to length (H) div 2 do
    Result:= Result+Char(StrToInt('$'+Copy(H,(I-1)*2+1,2)));
end;

No comments: