adley            &quot;</span></span></code></pre></div>
</div>
<div id="str_trunc-truncate-a-character-string" class="section level2">
<h2><code>str_trunc()</code>: Truncate a character string</h2>
<p>The stringr package provides an easy way to truncate a character
string: <code>str_trunc()</code>. Base R has no function to do this
directly.</p>
<div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb21-1"><a href="#cb21-1" tabindex="-1"></a>x <span class="ot">&lt