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

commits at source.squeak.org commits at source.squeak.org
Sun Oct 13 20:33:59 UTC 2019


A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-ct.858.mcz

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

Name: Collections-ct.858
Author: ct
Time: 13 October 2019, 10:33:55.310932 pm
UUID: 80a9daa4-d11d-554c-8530-f4d5a1a70c8f
Ancestors: Collections-pre.857

Adds #withFirstCharacterUpshifted analogously to #withFirstCharacterDownshifted

=============== Diff against Collections-pre.857 ===============

Item was changed:
  ----- Method: String>>withFirstCharacterDownshifted (in category 'converting') -----
  withFirstCharacterDownshifted
- 	"Return a copy with the first letter downShifted"
  	
  	| answer |
- 	
  	self ifEmpty: [^ self copy].
  	answer := self copy.
  	answer at: 1 put: (answer at: 1) asLowercase.
+ 	^ answer!
- 	^ answer. !

Item was added:
+ ----- Method: String>>withFirstCharacterUpshifted (in category 'converting') -----
+ withFirstCharacterUpshifted
+ 
+ 	| answer |
+ 	self ifEmpty: [^ self copy].
+ 	answer := self copy.
+ 	answer at: 1 put: (answer at: 1) asUppercase.
+ 	^ answer!

Item was changed:
  ----- Method: Symbol>>withFirstCharacterDownshifted (in category 'converting') -----
  withFirstCharacterDownshifted
+ 	"Answer an object like the receiver but with first character downshifted if necessary"
- 	"Answer an object like the receiver but with first character downshifted if necesary"
  
+ 	^self asString withFirstCharacterDownshifted asSymbol!
- 	^self asString withFirstCharacterDownshifted asSymbol.!

Item was added:
+ ----- Method: Symbol>>withFirstCharacterUpshifted (in category 'converting') -----
+ withFirstCharacterUpshifted
+ 	"Answer an object like the receiver but with first character upshifted if necessary"
+ 
+ 	^self asString withFirstCharacterUpshifted asSymbol!



More information about the Squeak-dev mailing list