[squeak-dev] The Trunk: Collections-mt.590.mcz
Bert Freudenberg
bert at freudenbergs.de
Wed Jan 14 12:27:35 UTC 2015
On 14.01.2015, at 11:47, commits at source.squeak.org wrote:
>
> 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.
Nice :)
> =============== 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]]!
Any reason against calling the non-parametrized method just "join:"? Is there precedent in other dialects?
- Bert -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4115 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150114/928e0150/smime-0001.bin
More information about the Squeak-dev
mailing list
|