From: matz@... (Yukihiro Matsumoto) Date: 2002-01-22T09:37:36+09:00 Subject: Re: to_hex? Hi, In message "Re: to_hex?" on 02/01/22, TheSchof writes: |> > Is there an easy way to convert a string to hex? |> > ie |> > |> > '15'.to_hex => 'F' |> |> print sprintf '%X', 15 | |Or even: |irb(main):007:0> "%X" % 15 |"F" Or even (in 1.7) irb(main):008:0> 15.to_s(16) "f" matz.