--- a/PeekableStream.st Sat Jan 04 21:09:17 1997 +0100
+++ b/PeekableStream.st Sat Jan 04 23:38:16 1997 +0100
@@ -189,22 +189,28 @@
upToSeparator
"Return the next elements up to but not including the next separator.
- The elements are supposed to understand isSeparator."
+ The elements are supposed to understand #isSeparator."
|answerStream element|
answerStream := WriteStream on:(self contentsSpecies new).
[self atEnd] whileFalse: [
- element := self peek.
- element isSeparator ifTrue: [^answerStream contents].
- answerStream nextPut: element.
- self next.
+ element := self peek.
+ element isSeparator ifTrue: [^answerStream contents].
+ answerStream nextPut: element.
+ self next.
].
^ answerStream contents
+
+ "
+ 'hello world' readStream upToSeparator
+ "
+
+ "Modified: 4.1.1997 / 23:38:05 / cg"
! !
!PeekableStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.15 1996-05-18 15:29:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.16 1997-01-04 22:38:16 cg Exp $'
! !