trim()</code>: Trim whitespace from a string</h2>
<p>Similarly, stringr provides <code>str_trim()</code> to trim
whitespace from a string. This is analogous to base R’s
<code>trimws()</code> added in R 3.3.0.</p>
<div class="sourceCode" id="cb22"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb22-1"><a href="#cb22-1" tabindex="-1"></a><span class="co"># base</span></span>
<span id="cb22-2"><a href="#cb22-2" tabindex="-1"></a><span class="fu">trimws</span>(<span class="st">&quot; String wi