(String streamContents: [:stream | 'A series of words to be shuffled' substrings shuffled do: [:each | stream nextPutAll: each] separatedBy: [stream space]])
- Bert -
That's still a lot of typing for what most other languages call join. On of the first extentions methods I added to Collection was this..
join: aString ^String streamContents: [:stream | self do: [:each | stream nextPutAll: each asString] separatedBy: [stream nextPutAll: aString]]