On Wed, 12 Nov 2008, Justus Ohlhaver wrote:

> Hello,
> 
> is there any method to quickly convert a text string such as 'Peter'
> into an integer? (And vice versa?)
> 
> I am not asking about just changing the format (to_i). I'm looking for a
> method thus can do the computation.

What properties do you want the string:integer relationship to have?
The problem is too unbounded at the moment.

["Peter", "James", "John", "Andrew"].index("Peter")

satisfies the constraints given so far.
> 
> Thanks,
> Justus

        Hugh