--- a/CharacterArray.st Tue Mar 28 16:34:56 2006 +0200
+++ b/CharacterArray.st Wed Mar 29 10:43:31 2006 +0200
@@ -2680,24 +2680,24 @@
tmpStream := WriteStream on:(self class new).
idx := 1.
[idx ~~ 0] whileTrue:[
- idx1 := idx.
- idx := self indexOfSubCollection:subString startingAt:idx.
- idx ~~ 0 ifTrue:[
- tmpStream nextPutAll:(self copyFrom:idx1 to:idx-1).
- tmpStream nextPutAll:newString.
- idx := idx + subString size
- ]
+ idx1 := idx.
+ idx := self indexOfSubCollection:subString startingAt:idx.
+ idx ~~ 0 ifTrue:[
+ tmpStream nextPutAll:(self copyFrom:idx1 to:idx-1).
+ tmpStream nextPutAll:newString.
+ idx := idx + subString size
+ ]
].
tmpStream nextPutAll:(self copyFrom:idx1).
^ tmpStream contents
"
- '12345678901234567890' replString:'123' withString:'OneTwoThree'
- '12345678901234567890' replString:'123' withString:'*'
- '12345678901234567890' replString:'234' withString:'foo'
-
- ('a string with spaces' replChar:$ withString:' foo ')
- replString:'foo' withString:'bar'
+ '12345678901234567890' copyReplaceString:'123' withString:'OneTwoThree'
+ '12345678901234567890' copyReplaceString:'123' withString:'*'
+ '12345678901234567890' copyReplaceString:'234' withString:'foo'
+
+ ('a string with spaces' copyReplaceAll:$ withAll:' foo ')
+ copyReplaceString:'foo' withString:'bar'
"
"Modified: / 31-05-1999 / 12:33:59 / cg"
@@ -5272,7 +5272,7 @@
!CharacterArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.340 2006-03-15 10:33:32 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.341 2006-03-29 08:43:31 stefan Exp $'
! !
CharacterArray initialize!