FourByteString.st
changeset 3533 1465b5fed73e
parent 2865 6f8b04862cc9
child 3586 a6d20359cdf4
--- a/FourByteString.st	Fri Mar 13 13:38:16 2015 +0100
+++ b/FourByteString.st	Sat Mar 14 22:29:24 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2004 by eXept Software AG
               All Rights Reserved
@@ -11,6 +13,8 @@
 "
 "{ Package: 'stx:libbasic2' }"
 
+"{ NameSpace: Smalltalk }"
+
 CharacterArray variableLongSubclass:#FourByteString
 	instanceVariableNames:''
 	classVariableNames:''
@@ -70,6 +74,16 @@
     ^ (super basicNew:anInteger) atAllPut:(Character space)
 
     "Modified: 26.2.1996 / 14:38:47 / cg"
+!
+
+uninitializedNew:anInteger
+    "return a new empty string with anInteger characters"
+
+    ^ super basicNew:anInteger
+
+    "
+        self uninitializedNew:10
+    "
 ! !
 
 !FourByteString methodsFor:'accessing'!
@@ -96,6 +110,20 @@
     ^ aCharacter
 ! !
 
+!FourByteString methodsFor:'encoding'!
+
+utf8Encoded
+    "Return my UTF-8 representation as a new String"
+
+    ^ self basicUtf8Encoded.
+!
+
+utf8EncodedOn:aStream
+    "write to aStream in utf8 encoding"
+
+    aStream nextPutAllUtf8:self.
+! !
+
 !FourByteString methodsFor:'queries'!
 
 bitsPerCharacter
@@ -112,7 +140,8 @@
 !FourByteString class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/FourByteString.st,v 1.3 2012-12-12 22:55:08 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/FourByteString.st,v 1.4 2015-03-14 21:29:24 stefan Exp $'
 ! !
 
+
 FourByteString initialize!