Marcel Taeumel uploaded a new version of fromCamelCaseBugFix to project The Treated Inbox: http://source.squeak.org/treated/fromCamelCaseBugFix-rpb.2.mcz
==================== Summary ====================
Name: fromCamelCaseBugFix-rpb.2 Author: rpb Time: 23 February 2023, 5:30:54.911688 pm UUID: d2c3cefb-be54-457d-bb50-9e522c3de213 Ancestors: fromCamelCaseBugFix-rpb.1
This code fixes a bug in fromCameCase. The old code would do: 'AnExampleString' fromCamelCase -> ' anExampleString'. The leading space should not be there. The problem occurs when the leading character is capitalized.
==================== Snapshot ====================
SystemOrganization addCategory: #fromCamelCaseBugFix!
----- Method: SequenceableCollection>>asSpaceInterleavedString (in category '*fromCamelCaseBugFix') ----- asSpaceInterleavedString "Convert to a string with a space between items. Assumes Elements are strings."
| stream | stream := WriteStream on: (String new: 100). self do: [:each | stream nextPutAll: each; space]. self size > 0 ifTrue: [stream skip: -1]. "remove trailing space" ^stream contents.!
----- Method: String>>fromCamelCase (in category '*fromCamelCaseBugFix') ----- fromCamelCase "convert 'anExampleString' to 'an example string'"
^self findFeatures asSpaceInterleavedString!
----- Method: String>>fromCamelCaseBugFixComment (in category '*fromCamelCaseBugFix') ----- fromCamelCaseBugFixComment " The new code fixes a bug in fromCameCase. The old code would do: 'AnExampleString' fromCamelCase -> ' anExampleString'. The leading space should not be there. The problem occurs when the leading character is capitalized. "!
packages@lists.squeakfoundation.org