[squeak-dev] The Inbox: Collections-ct.859.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Wed Oct 16 09:06:42 UTC 2019


We might want to have a "CollectionsExtras" package? :-D

Best,
Marcel
Am 13.10.2019 22:41:09 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-ct.859.mcz

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

Name: Collections-ct.859
Author: ct
Time: 13 October 2019, 10:40:56.879932 pm
UUID: 5e8fabca-af4e-c640-b6fd-95ebf4a6e424
Ancestors: Collections-ct.858

Proposal: Add string converters #asClassName and #asSelector

I am aware of #asIdentifier: as well as #asLegalSelector, but this proposal supports readable and convenient selectors

=============== Diff against Collections-ct.858 ===============

Item was added:
+ ----- Method: String>>asClassName (in category 'converting') -----
+ asClassName
+
+ ^ (self findFeatures collect: #withFirstCharacterUpshifted) join!

Item was added:
+ ----- Method: String>>asSelector (in category 'converting') -----
+ asSelector
+
+ | features |
+ features := self findFeatures.
+ features ifEmpty: [^ Symbol empty].
+ ^ ((features allButFirst collect: #withFirstCharacterUpshifted)
+ copyWithFirst: features first asLowercase)
+ join asSymbol!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191016/f0c7e698/attachment.html>


More information about the Squeak-dev mailing list