[Pkg] The Trunk: Collections-ul.238.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 3 03:06:07 UTC 2009


Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.238.mcz

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

Name: Collections-ul.238
Author: ul
Time: 2 December 2009, 5:54:41 am
UUID: 86a69c95-3e4b-5d4a-adc6-36e3f1039500
Ancestors: Collections-ul.237

- added #lf and #crlf to WriteStream (like #cr)
- updated String >> #withInternetLineEndings

=============== Diff against Collections-ul.237 ===============

Item was added:
+ ----- Method: WriteStream>>crlf (in category 'character writing') -----
+ crlf
+ 	"Append a line feed character to the receiver."
+ 
+ 	self nextPut: Character cr; nextPut: Character lf!

Item was added:
+ ----- Method: WriteStream>>lf (in category 'character writing') -----
+ lf
+ 	"Append a line feed character to the receiver."
+ 
+ 	self nextPut: Character lf!

Item was changed:
  ----- Method: String>>withInternetLineEndings (in category 'internet') -----
  withInternetLineEndings
+ 	"change line endings from CR's and LF's to CRLF's.  This is probably in prepration for sending a string over the Internet"
- 	"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 crlf ] ] ]!
- 					stream cr; nextPut: Character lf ] ] ]!



More information about the Packages mailing list