SequenceableCollection.st
branchjv
changeset 18040 a11a12546f23
parent 18037 4cf874da38c9
parent 14947 e9a0049c0ef1
child 18045 c0c600e0d3b3
--- a/SequenceableCollection.st	Mon Mar 25 23:04:02 2013 +0000
+++ b/SequenceableCollection.st	Wed Mar 27 12:24:15 2013 +0000
@@ -368,6 +368,7 @@
     ^ self == SequenceableCollection
 ! !
 
+
 !SequenceableCollection methodsFor:'Compatibility-Squeak'!
 
 allButFirst
@@ -3472,6 +3473,18 @@
     "
 !
 
+copyReplaceAny:collectionOfOldElements with:newElement
+    "return a copy of the receiver, where all elements equal to any in collectionOfOldElements
+     have been replaced by newElement."
+
+    ^ self copy replaceAny:collectionOfOldElements with:newElement
+
+    "
+     #(1 2 3 1 2 3 1 2 3 4 1 2 3 1 2 3) copyReplaceAny:#(1 2) with:99
+     'hello world' copyReplaceAny:'eo' with:$*
+    "
+!
+
 copyReplaceFrom:startIndex to:endIndex with:aCollection
     "return a copy of the receiver, where the elements from startIndex to
      endIndex have been replaced by the elements of aCollection"
@@ -8846,11 +8859,11 @@
 !SequenceableCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.331 2013-03-18 21:47:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.332 2013-03-25 12:26:12 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.331 2013-03-18 21:47:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/SequenceableCollection.st,v 1.332 2013-03-25 12:26:12 cg Exp $'
 ! !