StringCollection.st
changeset 7899 7577df77ba95
parent 7829 96a7b0065d77
child 7916 55417bd7cc1d
--- a/StringCollection.st	Tue Feb 10 18:03:35 2004 +0100
+++ b/StringCollection.st	Tue Feb 10 18:09:07 2004 +0100
@@ -122,6 +122,14 @@
         final:nil
 !
 
+encodeFrom:oldEncoding into:newEncoding
+    ^ self collect:[:line |
+        line isNil 
+            ifTrue:[ nil ]
+            ifFalse:[ CharacterEncoder encode:line from:oldEncoding into:newEncoding]
+      ]
+!
+
 from:aString
     "setup my contents from the argument, aString"
 
@@ -171,6 +179,14 @@
     ^ self asString
 ! !
 
+!StringCollection methodsFor:'queries'!
+
+encoding
+    self do:[:l | l notNil ifTrue:[^ l encoding]].
+    "/ sigh
+    ^ #'iso8859-1'
+! !
+
 !StringCollection methodsFor:'searching'!
 
 indexOfLineStartingWith:aString
@@ -258,5 +274,5 @@
 !StringCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/StringCollection.st,v 1.31 2004-01-14 16:03:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/StringCollection.st,v 1.32 2004-02-10 17:08:56 cg Exp $'
 ! !