Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-01-2009, 10:02 AM
Mujaidin Mujaidin is offline
Junior Member
 
Join Date: Jun 2009
Posts: 4
Question How to convert Hexadecimal to STRING

How to convert Hexadecimal to STRING???
please can you show me an exemple code, using
the value here below.

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

Regards, Alessandro
Reply With Quote
  #2  
Old 09-01-2009, 05:04 PM
KevMc KevMc is offline
Member
 
Join Date: Aug 2009
Location: United Kingdom
Posts: 45
Default

Hi,

This function should help you.

Code:
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;
Cheers

Kevin

Last edited by Norrit; 09-02-2009 at 02:57 PM. Reason: added the code-tags
Reply With Quote
  #3  
Old 09-02-2009, 11:13 AM
Mujaidin Mujaidin is offline
Junior Member
 
Join Date: Jun 2009
Posts: 4
Smile reply

tanks kevin!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:51 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.