On 15 Feb 2013, at 00:09, "Torsten Bergmann" <
[hidden email]> wrote:
> convertFromBase: sourceBase to: targetBase
> "Convert the receiver (who has to represent a number string) from the given source base to
> the given target base
>
> 'FFFF' convertFromBase: 16 to: 2
> "
> ^(sourceBase asString,'r', self) asNumber printStringBase: targetBase
Please, make that
^ (Number readFrom: self base: sourceBase) printStringBase: targetBase
No useless copying and concatenating, simpler and more elegant.
Sven
--
Sven Van Caekenberghe
http://stfx.euSmalltalk is the Red Pill