From: Jari Williamsson Date: 2008-02-28T07:16:28+09:00 Subject: Re: extracting hex keys from file Convert the integer to a string using base 16: f.getc.to_s(16) Best regards, Jari Williamsson Ben Aroia wrote: > I've read that. I'm looking for an f.gethex (returns a string with "F4" > or something) I could even deal with converting the f.getc value to a > hex value (in a string format) I'm considering writing a giant if > statement (but my fingers are starting to hurt) > > Robert Klemme wrote: >> On 27.02.2008 05:08, Ben Aroia wrote: >>> I would like to extract the hex values from a known offset for a >>> specific length, and I'm quite sure I can do that by accelorating the >>> pointer a bit with a simple for loop. I come from a Java background and >>> new to ruby so any help would be great. Thanks >> http://www.ruby-doc.org/core/classes/IO.html#M002305 >> >> robert