--- a/SequenceableCollection.st Thu Jul 15 01:56:49 1999 +0200
+++ b/SequenceableCollection.st Thu Jul 15 15:34:49 1999 +0200
@@ -855,7 +855,8 @@
startsWith:aCollection
"return true, if the receivers first elements match those
- of aCollection"
+ of aCollection
+ If the argument is empty, true is returned."
|index "{ Class: SmallInteger }"
stop "{ Class: SmallInteger }" |
@@ -868,8 +869,8 @@
index := 1.
[index <= stop] whileTrue:[
- (self at:index) = (aCollection at:index) ifFalse:[^false].
- index := index + 1
+ (self at:index) = (aCollection at:index) ifFalse:[^false].
+ index := index + 1
].
^ true
@@ -877,6 +878,7 @@
'abcde' startsWith:#($a $b $c)
#[1 2 3 4] startsWith:#(1 2 3)
#(1 2 3 4) asOrderedCollection startsWith:#(1 2 3)
+ #(1 2 3 4) asOrderedCollection startsWith:#()
"
! !
@@ -4269,6 +4271,6 @@
!SequenceableCollection class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.109 1999-07-13 16:12:05 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.110 1999-07-15 13:34:49 cg Exp $'
! !
SequenceableCollection initialize!