this part is missing some methods and rethinking others.
replaceAll: with:
we never know if this is a collection or all the occurrent of one
character.
Now replaceAll: col will replace all the col occurrences
'foafobf f' copyReplaceAll: 'fo' with: 'zork'
> 'zorkazorkbf f'
but this is not what you want.
'lapin' copyReplaceAll: 'a' with: 'zork'
'lzorkpin'
Stef
> Hello guys, I just encounter these methods and got a bit disappointed
>
> First there is
>
> SequenceableCollection>>#replaceAll: oldObject with: newObject
> "Replace all occurences of oldObject with newObject"
>
> On String it something like:
>
> string := 'lapin'.
> string replaceAll: $a with: $b
>
> so now string is 'lbpin'
>
> Looking for a non destructive version, I looked at: #copyReplaceAll:with:
>
> SequenceableCollection>>#copyReplaceAll: oldSubstring with: newSubstring
> "Default is not to do token matching.
> See also String copyReplaceTokens:with:"
>
> So here it's not destructive, but
> 1) The argument names are wrong (or the method is not defined on the correct
> class)
> 2) why one take an element as argument and the other one a collection of
> elements ?
>
>
> Am I the only one disturb by this ?
>
>
> Ben
>