The Trunk: Collections-nice.361.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-nice.361.mcz

commits-2
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.361.mcz

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

Name: Collections-nice.361
Author: nice
Time: 11 June 2010, 9:47:59.541 pm
UUID: 4815d286-151b-5e40-9306-020d15d6a8c6
Ancestors: Collections-nice.360

Provides a new String utility #lines.

(aString lines) is to replace (aString findTokens: String cr).
It works for any line-ending (CR LF CR-LF).

=============== Diff against Collections-nice.360 ===============

Item was added:
+ ----- Method: String>>lines (in category 'accessing') -----
+ lines
+ "Answer an array of lines composing this receiver without the line ending delimiters."
+
+ ^Array new: (self size // 60 max: 16) streamContents: [:lines |
+ self linesDo: [:aLine | lines nextPut: aLine]]!