[squeak-dev] The Trunk: Collections-nice.274.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Jan 5 17:37:43 UTC 2010
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.274.mcz
==================== Summary ====================
Name: Collections-nice.274
Author: nice
Time: 5 January 2010, 6:37:34 am
UUID: fad23f8c-d34f-44b4-9da2-e741fc8c235c
Ancestors: Collections-nice.273
Simplify asLegalSelector
=============== Diff against Collections-nice.273 ===============
Item was changed:
----- Method: String>>asLegalSelector (in category 'converting') -----
asLegalSelector
| toUse |
+ toUse := self select: [:char | char isAlphaNumeric].
+ (toUse size == 0 or: [toUse first isLetter not])
- toUse := ''.
- self do:
- [:char | char isAlphaNumeric ifTrue: [toUse := toUse copyWith: char]].
- (self size == 0 or: [self first isLetter not])
ifTrue: [toUse := 'v', toUse].
+ ^ toUse withFirstCharacterDownshifted!
-
- ^ toUse withFirstCharacterDownshifted
-
- "'234znak 43 ) 2' asLegalSelector"!
More information about the Squeak-dev
mailing list
|