From: Jack Dempsey Date: 2002-01-22T07:49:02+09:00 Subject: RE: to_hex? aha! I knew there had to be an easy way... just curious, any reason not to use printf? Thanks! Jack > -----Original Message----- > From: Michael Davis [mailto:mdavis@sevainc.com] > Sent: Monday, January 21, 2002 5:47 PM > To: ruby-talk ML > Subject: Re: to_hex? > > > Jack Dempsey wrote: > > > Is there an easy way to convert a string to hex? > > ie > > > > '15'.to_hex => 'F' > > > > TIA, > > Jack > > > > > > > > print sprintf '%X', 15 > > -- > Michael Davis > Database Architect and Senior Software Engineer, Seva Inc. > Email: mdavis@sevainc.com > > >