[squeak-dev] The Trunk: EToys-ct.484.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Oct 10 12:48:48 UTC 2022
Christoph Thiede uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-ct.484.mcz
==================== Summary ====================
Name: EToys-ct.484
Author: ct
Time: 10 October 2022, 2:48:26.079054 pm
UUID: 3c420302-a1c2-644c-9fab-1b330f2e8006
Ancestors: EToys-ct.483
[nit] Fixes a plenk.
=============== Diff against EToys-ct.483 ===============
Item was changed:
----- Method: String>>fromCamelCase (in category '*Etoys-Squeakland-converting') -----
fromCamelCase
+ "convert 'anExampleString' to 'an example string'"
- "convert 'anExampleString' to 'an example string'"
| upper nextWord start |
upper := ($A to: $Z) asCharacterSet.
nextWord := self indexOfAnyOf: upper.
nextWord = 0 ifTrue: [^self].
start := 1.
^String streamContents: [:strm |
[
strm nextPutAll: (self copyFrom: start to: nextWord-1).
strm space; nextPut: (self at: nextWord) asLowercase.
start := nextWord+1.
nextWord := self indexOfAnyOf: upper startingAt: start.
nextWord = 0
] whileFalse.
strm nextPutAll: (self copyFrom: start to: self size).
].!
More information about the Squeak-dev
mailing list
|