views:

100

answers:

1

Hello everybody,

I'm trying to output the value of a TByte as its corresponding hexadezimal representation in an AnsiString.

Example: TByte is 0x4F AnsiString: "4F" (two characters, a 4 and an F)

I know of the StringOf function, but that converts to the "mapped" character.

Is there any decent function build in or does somebody has a good idea how to implement this fast?

Thank you very much in advance :)

+8  A: 

I'd cast it to a Byte and feed it to SysUtils.IntToHex.

Mason Wheeler
Yey it works :D Thank you, I just noticed that it wasnt TByte but a "Byte", so I could feed it as it was.
ThE_-_BliZZarD