[squeak-dev] The Trunk: Collections-cmm.801.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Jul 15 21:33:42 UTC 2018


Chris Muller uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-cmm.801.mcz

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

Name: Collections-cmm.801
Author: cmm
Time: 15 July 2018, 4:33:18.797462 pm
UUID: dbaa6e91-604d-4f66-aef8-9c1900c499a7
Ancestors: Collections-ul.800

It turns out better and more consistent for String>>#condensedIntoOneLine to do a uniform conversion than trimBlanks.

=============== Diff against Collections-ul.800 ===============

Item was changed:
  ----- Method: String>>condensedIntoOneLine (in category 'converting') -----
  condensedIntoOneLine
  	"Return a copy of the receiver with all separators converted to spaces, and with no consecutive spaces.  A formatting tool."
  	^ String streamContents:
  		[ : stream | | prior |
+ 		prior := $X.  "some non-separator"
+ 		self do:
- 		prior := $X.  "any non-blank"
- 		self withBlanksTrimmed do:
  			[ : char | char isSeparator ifTrue: [ prior isSeparator ifFalse: [stream space]] ifFalse: [ stream nextPut: char ].
  			prior := char ] ]!



More information about the Squeak-dev mailing list