String to Hexadecimal

Submitted by:Pitter Alderson

Date added:13 March, 2011

Category:Delphi

This code convert String to Hexadecimal

Tags: string to hexadecimal , convert string

Code Snippet:

      function String2Hex(const Buffer: Ansistring): string;
var
n: Integer;
begin
Result := '';
for n := 1 to Length(Buffer) do
Result := LowerCase(Result + IntToHex(Ord(Buffer[n]), 2));
end;
 
 

Comments