Source Code
(define (repl-substring string target repl pos)
;; Replace substring in a string
(let ((matches (repl-substring? string target pos)))
(if matches
(string-append
(substring string 0 pos)
repl
(substring string
(+ pos (string-length target))
(string-length string)))
string)))