when <code>replacement$</code> contains <code>needle$</code>.</p>
<p><b>Notes</b></p>
<ul>
<li>If <code>needle$</code> is <code>""</code> (empty), the call is a <b>no-op</b> and returns a copy of <code>haystack$</code>. This avoids degenerate infinite insertions.</li>
<li>If <code>replacement$</code> is <code>""</code>, all occurrences of <code>needle$</code> are <b>removed</b>.</li>
<li>Behaviour is <b>non-overlapping</b>: after a match, the search continues immediately after the replaced span.</li>
<li>If