#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Sat, 28 Sep 2019 15:03:52 +0200
changeset 24805 37e4917e7c00
parent 24804 64a11f77e263
child 24806 9cb7d02d9d23
#REFACTORING by stefan class: PeekableStream changed: #skipSeparators
PeekableStream.st
--- a/PeekableStream.st	Sat Sep 28 14:52:23 2019 +0200
+++ b/PeekableStream.st	Sat Sep 28 15:03:52 2019 +0200
@@ -304,10 +304,8 @@
 
     |nextOne|
 
-    nextOne := self peekOrNil.
-    [nextOne notNil and:[nextOne isSeparator]] whileTrue:[
+    [(nextOne := self peekOrNil) notNil and:[nextOne isSeparator]] whileTrue:[
         self next.
-        nextOne := self peekOrNil
     ].
     ^ nextOne
 
@@ -316,12 +314,14 @@
 
      s := ReadStream on:'one      two\three' withCRs.
      s skipSeparators.
-     Transcript showCR:(s nextWord).
+     Transcript showCR:(s nextAlphaNumericWord).
      s skipSeparators.
-     Transcript showCR:(s nextWord).
+     Transcript showCR:(s nextAlphaNumericWord).
      s skipSeparators.
      Transcript showCR:(s next displayString).
     "
+
+    "Modified (comment): / 28-09-2019 / 15:01:04 / Stefan Vogel"
 !
 
 skipSeparatorsExceptCR