irb(main):006:0> 50.to_s(36)
=> "1e"
50 base 36 = 1*36 + 14
HTH,
Jeffrey
That works really well. If you'd like something more sophisticated, you
could implement Doug Crockford's base-32 algorithm described at
http://crockford.com/wrmg/base32.html . I've got some code for that
algorithm at
http://groups.google.com/group/techvalleyrb/msg/ac3ce4ae6620268a that I
probably should put into a gem...
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.