On 2003-11-25 at 18:17:04, Piers Cawley wrote: > aString replace: aPattern with: aString. > > aString replaceAll: aPattern with: aString.
Stop! Stop that at once! No small talk; we're here for serious discussions! :) > Except... the second argument isn't strictly a string because it's > evaluated in the match context. Assuming we get a pure functional form > of the substitution operator, then scoping's going to be fun. If you > want a simple form with the signature: > > method String::sub( Rule $pattern, String $replacement ) > > you're almost certainly going to have to implement that as a macro so > you can get at the string before it's interpolated. Or you could have the method version take a closure/proc object/block/whatever, which gets run each time to generate the replacement. Quoting is then not an issue. Hm. What was that about the Rubyometer? :) -Mark -- Mark REED | CNN Internet Technology 1 CNN Center Rm SW0831G | [EMAIL PROTECTED] Atlanta, GA 30348 USA | +1 404 827 4754