[squeak-dev] The Inbox: fromCamelCaseBugFix-rpb.2.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Feb 24 00:30:56 UTC 2023
A new version of fromCamelCaseBugFix was added to project The Inbox:
http://source.squeak.org/inbox/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.
"!
More information about the Squeak-dev
mailing list
|