n class="co">#&gt; [1] &quot;Hadley Wickham&quot;</span></span></code></pre></div>
</div>
<div id="str_sub---subset-assignment" class="section level2">
<h2><code>str_sub() &lt;-</code>: Subset assignment</h2>
<p><code>substr()</code> behaves in a surprising way when you replace a
substring with a different number of characters:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" tabindex="-1"></a><span class="co"># base</span></span>