[squeak-dev] The Trunk: Collections-ul.209.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Nov 25 05:46:27 UTC 2009


Andreas Raab uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.209.mcz

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

Name: Collections-ul.209
Author: ul
Time: 23 November 2009, 2:34:16 am
UUID: 7b06f5ea-0659-5d49-8e84-9256a3de1671
Ancestors: Collections-nice.208

- fix: String >> #withInternetLineEndings raised an MNU: WriteStream doesNotUnderstand: #lf

=============== Diff against Collections-nice.208 ===============

Item was changed:
  ----- Method: String>>withInternetLineEndings (in category 'internet') -----
  withInternetLineEndings
  	"change line endings from CR's to CRLF's.  This is probably in prepration for sending a string over the Internet"
+ 	
  	^self class
  		new: self size * 16 // 15 "provisions for CR-LF pairs"
  		streamContents: [ :stream |
  			self lineIndicesDo: [:start :endWithoutDelimiters :end |
  				stream nextPutAll: (self copyFrom: start to: endWithoutDelimiters).
+ 				endWithoutDelimiters = end ifFalse: [
+ 					stream cr; nextPut: Character lf ] ] ]!
- 				endWithoutDelimiters = end ifFalse: [	stream cr; lf] ] ]!




More information about the Squeak-dev mailing list