On Wed, 2003-07-02 at 17:25, Josef 'Jupp' Schugt wrote:
> Saluton!
>
> * Dave Thomas; 2003-07-02, 20:26 UTC:
> > This is a test 'ri'. Please report errors and omissions
> > on http://www.rubygarden.org/ruby?RIOnePointEight
> >
> > ------------------------------------------------------------ Fixnum#to_s
> > fix.to_s( base=10 ) -> aString
> >
> > ------------------------------------------------------------------------
> > Returns a string containing the representation of fix radix base
> > (2, 8, 10, or 16).
> > 12345.to_s #=> "12345"
> > 12345.to_s(2) #=> "11000000111001"
> > 12345.to_s(
#=> "30071"
> > 12345.to_s(10) #=> "12345"
> > 12345.to_s(16) #=> "3039"
>
> to_s works for any basis from 2 to 36 using these digits:
>
> 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, a, b, c, d, e, f, g, h,
> i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
>
> Gis,
>
> Josef 'Jupp' Schugt
Cool. Is there a way to from a string to an int with any base?
--
Tom Felker <>