[squeak-dev] The Trunk: Collections-dtl.954.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 26 21:06:46 UTC 2021


David T. Lewis uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-dtl.954.mcz

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

Name: Collections-dtl.954
Author: dtl
Time: 26 August 2021, 5:06:44.899886 pm
UUID: 62e50672-2876-46a2-8959-6d6eea2cc1e8
Ancestors: Collections-eem.953

Add SOH (start of heading) to the list of recognized separator characters, per follow up disscussion from Collections-pre.857. Rationale explained in http://lists.squeakfoundation.org/pipermail/squeak-dev/2019-October/204555.html

=============== Diff against Collections-eem.953 ===============

Item was changed:
  ----- Method: Character class>>separators (in category 'instance creation') -----
  separators
  	"Answer a collection of the standard ASCII separator characters."
  
+ 	^ {	Character value: 32. "space"
+ 		Character value: 13. "cr"
+ 		Character value: 9. "tab"
+ 		Character value: 10. "line feed"
+ 		Character value: 12. "form feed"
+ 		Character value: 1. "start of heading"
+ 	} as: String!
- 	^ #(32 "space"
- 		13 "cr"
- 		9 "tab"
- 		10 "line feed"
- 		12 "form feed")
- 		collect: [:v | Character value: v] as: String!

Item was changed:
  ----- Method: Character>>isSeparator (in category 'testing') -----
  isSeparator
  	"Answer whether the receiver is one of the separator characters--space, 
  	cr, tab, line feed, or form feed."
  
  	| integerValue |
  	(integerValue := self asInteger) > 32 ifTrue: [ ^false ].
  	integerValue
  		caseOf: {
  			[ 32 "space" ] -> [ ^true ].
  			[ 9 "tab" ] -> [ ^true ].
  			[ 13 "cr"] -> [ ^true ].
  			[ 10 "line feed" ] -> [ ^true ].
+ 			[ 12 "form feed"] -> [ ^true ].
+ 			[ 1 "start of heading"] -> [ ^true ] }
- 			[ 12 "form feed"] -> [ ^true ] }
  		otherwise: [ ^false  ]!



More information about the Squeak-dev mailing list