From: Ken Bloom Date: 2008-11-13T00:07:23+09:00 Subject: Re: Convert text string i.e 'Peter' into integer ID On Wed, 12 Nov 2008 08:16:36 -0500, 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. > > Thanks, > Justus Does "Peter".hash do what you want? --Ken -- Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/