Frederick Cheung wrote:
> 
> the to_i method on string takes an optional argument (the base to
> use).
> 
> Fred

Yes, but it doesn't convert it the way I need it to. What I mean is:

"FFFFFF".to_i(base=16) # => 16777215

I need it to be more like this:

"FFFFFF".whatever_magic_method # => 0xFFFFFF
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to