From: Pierre-Charles David Date: 2001-08-10T00:11:49+09:00 Subject: [ruby-talk:19436] Re: Simple Question 2 Steve Tuckner wrote: > Is there a built in way to handle conversion of hex values in strings to > integers? Examples of possible syntax if it doesn't exist > > > > "0xF0".to_i # have it handle leading 0x for hex or 0 for octal String#hex does what you want. String#oct also exists for octal values. > "F0".to_i(16) # pass in the base, assume decimal if no argument. I don't know about this one, String#to_i assumes decimal format. It might be a candidate for an RCR. -- Pierre-Charles David (pcdavid emn fr) DEA Informatique, �cole des Mines de Nantes, France