Costas,
"Costas Menico" <
[hidden email]> wrote in message
news:
[hidden email]...
> What is the best way to replicate a string n number of times?
>
> I was hoping to find a message in the String class such as in the
> example:
>
> str := 'abc' repeat: 4
I don't think there is anything existing in the image to do this but it's
easy enough to add a method to String -
String>>repeat: anInteger
| stream |
stream := String writeStream.
anInteger timesRepeat: [stream nextPutAll: self].
^stream contents
Ian