[ENH] String repeat

Bert Freudenberg bert at isgnw.CS.Uni-Magdeburg.De
Mon May 29 06:54:06 UTC 2000


On Sun, 28 May 2000, David N. Smith (IBM) wrote:

> Attached is a method I've evolved over a while which does string
> repeats:
> 
> 	'0' rep: 5    ==>    '00000'

0. Seems useful :-)
1. This should go up into SequencableCollection, not String.
2. It should have a more descriptive selector (at least repeat:).
3. Could be refactored to share the duplication code with from:to:put:.

-- Bert





More information about the Squeak-dev mailing list