--- a/PeekableStream.st Wed Apr 22 07:33:07 2015 +0100
+++ b/PeekableStream.st Thu Apr 23 08:04:13 2015 +0100
@@ -558,9 +558,9 @@
| out ch |
- out := WriteStream on: (String uninitializedNew: 1000).
self atEnd ifTrue: [^ ''].
self next == terminator ifFalse: [self skip: -1]. "absorb initial terminator"
+ out := WriteStream on:(self contentsSpecies new).
[(ch := self next) == nil] whileFalse: [
(ch == terminator) ifTrue: [
self peek == terminator ifFalse: [
@@ -710,7 +710,9 @@
nextAlphaNumericWord
"read the next word (i.e. up to non letter-or-digit).
Return a string containing those characters.
- Any leading non-alphaNumeric chars are skipped."
+ Any leading non-alphaNumeric chars are skipped.
+
+ National letters or digits in unicode are not treated as letters."
|s c|
@@ -725,7 +727,7 @@
] whileFalse.
"second: get the alphanumeric word"
- s := WriteStream on:(String new:128).
+ s := WriteStream on:(self contentsSpecies new:100).
[
s nextPut:c.
@@ -740,7 +742,7 @@
^ s contents.
- "Use UnicodString in the examples, to avoid the optimization in ReadStream for Strings"
+ "Use UnicodeString in the examples, to avoid the optimization in ReadStream for Strings"
"
|s|
@@ -845,11 +847,11 @@
!PeekableStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.54 2015-04-14 11:04:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.55 2015-04-22 18:01:58 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.54 2015-04-14 11:04:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.55 2015-04-22 18:01:58 stefan Exp $'
! !