[squeak-dev] The Trunk: Collections-bf.479.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jul 4 15:37:40 UTC 2012


Bert Freudenberg uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-bf.479.mcz

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

Name: Collections-bf.479
Author: bf
Time: 4 July 2012, 5:37:06.028 pm
UUID: 76a4f53b-5426-4640-9bb2-6449accdcef6
Ancestors: Collections-eem.478

String>>withUnixLineEndings should not modify the string in-place.

=============== Diff against Collections-eem.478 ===============

Item was changed:
  ----- Method: String>>withSqueakLineEndings (in category 'internet') -----
  withSqueakLineEndings
  	"Assume the string is textual, and that CR, LF, and CRLF are all valid line endings.
  	Replace each occurence with a single CR."
  
  	(self includes: Character lf) ifFalse: [ ^self ].
  	(self includes: Character cr) ifFalse: [
+ 		^self copy translateWith: String crLfExchangeTable ].
- 		^self translateWith: String crLfExchangeTable ].
  	^self withLineEndings: String cr!

Item was changed:
  ----- Method: String>>withUnixLineEndings (in category 'internet') -----
  withUnixLineEndings
  	"Assume the string is textual, and that CR, LF, and CRLF are all valid line endings.
  	Replace each occurence with a single LF."
  
  	(self includes: Character cr) ifFalse: [ ^self ].
  	(self includes: Character lf) ifFalse: [
+ 		^self copy translateWith: String crLfExchangeTable ].
- 		^self translateWith: String crLfExchangeTable ].
  	^self withLineEndings: String lf!



More information about the Squeak-dev mailing list