[squeak-dev] The Trunk: Collections-mt.590.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jan 14 11:47:21 UTC 2015


Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.590.mcz

==================== Summary ====================

Name: Collections-mt.590
Author: mt
Time: 14 January 2015, 12:47:06.604 pm
UUID: 5165dd57-c3e5-5d45-9c61-bc820f2fab02
Ancestors: Collections-mt.589

Methods added to easily join split strings.

=============== Diff against Collections-mt.589 ===============

Item was added:
+ ----- Method: SequenceableCollection>>join (in category 'converting') -----
+ join
+ 	"Example: #(H e l l o W o r l d) join = 'HelloWorld'.  "
+ 
+ 	^ self joinSeparatedBy: ''!

Item was added:
+ ----- Method: SequenceableCollection>>joinSeparatedBy: (in category 'converting') -----
+ joinSeparatedBy: aSeparator
+ 	"Returns a string, which is a concatenation of each element's string representation separated by another string."
+ 
+ 	^ String streamContents: [:stream |
+ 		self
+ 			do: [:ea | stream nextPutAll: ea asString]
+ 			separatedBy: [stream nextPutAll: aSeparator asString]]!



More information about the Squeak-dev mailing list