ReadStream.st
changeset 19232 47ab0b47e9c9
parent 18266 d2e1d1f33fae
child 19236 e6403ba50de1
child 19436 959346d06370
--- a/ReadStream.st	Tue Feb 16 09:45:47 2016 +0100
+++ b/ReadStream.st	Tue Feb 16 15:06:54 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1988 by Claus Gittinger
 	      All Rights Reserved
@@ -584,6 +582,26 @@
     ^ collection at:(position + 1)
 !
 
+nextUnicode16CharacterMSB:msb
+    ^ Character value:(self nextUnsignedShortMSB:msb)
+
+    "
+     #[16r00 16r51] readStream nextUnicode16CharacterMSB:true
+     #[16r00 16r51] readStream nextUnicode16CharacterMSB:false
+    "
+!
+
+nextUnicode16Characters:count MSB:msb
+    ^ (1 to:count) 
+        collect:[:i | self nextUnicode16CharacterMSB:msb]
+        as:Unicode16String
+
+    "
+     #[16r00 16r51] readStream nextUnicode16Characters:1 MSB:true
+     #[16r00 16r51] readStream nextUnicode16Characters:1 MSB:false
+    "
+!
+
 peek
     "return the next element; do NOT advance read pointer.
      return nil, if there is no next element.
@@ -917,10 +935,10 @@
 !ReadStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.83 2015-04-22 16:05:16 stefan Exp $'
+    ^ '$Header$'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadStream.st,v 1.83 2015-04-22 16:05:16 stefan Exp $'
+    ^ '$Header$'
 ! !