string-replace Alex Shinn (09 May 2016 13:57 UTC)
Re: string-replace John Cowan (10 May 2016 02:52 UTC)

string-replace Alex Shinn 09 May 2016 13:57 UTC

The description:

(string-append (substring/cursors s1 0 start1)
               (substring/cursors s2 start2 end2)
               (substring/cursors s1 end1 (string-length s1)))

mixes cursors and indexes.  It should be:

(string-append (substring/cursors s1 (string-cursor-start s1) start1)
               (substring/cursors s2 start2 end2)
               (substring/cursors s1 end1 (string-cursor-end s1 s1)))

--
Alex