Format string to hex

hello,boys
I have a problem,I want to format the string to hex ,just like format
abc to
0x616263 ,but I don't know how to do it ,
Can you help me,and give me a code?

thx

···

--
Posted via http://www.ruby-forum.com/.

Hi,

···

Am Sonntag, 08. Apr 2007, 21:33:14 +0900 schrieb Rubt Test:

I want to format the string to hex ,just like format
abc to
0x616263 ,but I don't know how to do it ,

  "abc".unpack "H*"

Bertram

--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de