Re: [racket-dev] `string-replace'

2012-04-19 Thread Eli Barzilay
Two hours ago, Laurent wrote: Maybe also a `string-replace' could be useful, especially when one does not want regexps and has special characters that need to be quoted. Again, it's not clear how this shold look -- my guess: (define (string-replace from str to) (regexp-replace*

Re: [racket-dev] `string-replace'

2012-04-19 Thread Matthew Flatt
At Thu, 19 Apr 2012 08:26:20 -0400, Eli Barzilay wrote: Two hours ago, Laurent wrote: Maybe also a `string-replace' could be useful, especially when one does not want regexps and has special characters that need to be quoted. Again, it's not clear how this shold look -- my guess:

Re: [racket-dev] `string-replace'

2012-04-19 Thread Laurent
On Thu, Apr 19, 2012 at 14:26, Eli Barzilay e...@barzilay.org wrote: Two hours ago, Laurent wrote: Maybe also a `string-replace' could be useful, especially when one does not want regexps and has special characters that need to be quoted. Again, it's not clear how this shold look -- my

Re: [racket-dev] `string-replace'

2012-04-19 Thread Eli Barzilay
30 minutes ago, Laurent wrote: I meant this: (define (string-replace from str to)    (regexp-replace* (regexp-quote from) str (regexp-replace-quote to))) 30 minutes ago, Matthew Flatt wrote: Surely Laurent meant (define (string-replace str from to) (regexp-replace*