 <code>haystack$</code> is <code>""</code>, the function returns <code>""</code>.</li>
</ul>
<p><b>Errors</b></p>
<ul>
<li><b>Type mismatch</b> if any argument is not a string expression.</li>
<li><b>Wrong number of arguments</b> if fewer or more than three arguments are supplied.</li>
</ul>
<p><b>Examples</b></p>
<div class="fragment"><div class="line">&#39; Basic replacement (case-sensitive)</div>
<div class="line">PRINT REPLACE$(&quot;Hello hello&quot;, &quot;he&quot;, &quot;X&quot;)     &#39; -&gt; Hell