You need to generate a SHA1 or MD5 hash from your string.

require 'digest/md5'
d =3D Digest::MD5.new
d.update("if you believe it, they have put a man on the moon")
uniq =3D d.hexdigest


> -----Original Message-----
> From: ohlhaver / gmail.com [mailto:ohlhaver / gmail.com]=20

>=20
> Thanks for your help. No I need to turn the string which=20
> would usually be a headline ('Man lands on the moon') into a=20
> unique number. The purpose is to speed up my database queries=20
> when checking whether an entry with the same headline already=20
> exists in the db.
> Justus