--- a/Collection.st Thu Apr 20 20:04:43 1995 +0200
+++ b/Collection.st Mon May 01 23:30:32 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.30 1995-04-11 14:48:46 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.31 1995-05-01 21:28:58 claus Exp $
'!
!Collection class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.30 1995-04-11 14:48:46 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.31 1995-05-01 21:28:58 claus Exp $
"
!
@@ -269,6 +269,23 @@
self do: [:each | ^ each].
^ nil
+!
+
+upTo:anElement
+ "return a new collection consisting of the receivers elements upTo
+ (but excluding) anElement.
+ If anElement is not in the receiver, the returned collection
+ will consist of all elements of the receiver"
+
+ |s|
+
+ s := ReadStream on:self.
+ ^ s upTo:anElement
+
+ "
+ 'test.text' upTo:$.
+ #(1 2 3 4 5) upTo:4
+ "
! !
!Collection methodsFor:'adding & removing'!