[racket-dev] `string-replace'

From: Eli Barzilay (eli at barzilay.org)
Date: Thu Apr 19 08:26:20 EDT 2012

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* (regexp-quote from) str to))

If so, then I see a weak point for this too: on one hand it does
compose two functions, but it does nothing more than that.  Also
"characters that need to be quoted" seem suspicious to me -- can you
clarify?  (I see "quoting" next to something that is supposed to be
newbie-friendly, and my alarm goes off...)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.