EVOLUTION-MANAGER
Edit File: str_trim.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Trim whitespace from a string</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for str_trim {stringr}"><tr><td>str_trim {stringr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Trim whitespace from a string</h2> <h3>Description</h3> <p><code>str_trim()</code> removes whitespace from start and end of string; <code>str_squish()</code> also reduces repeated whitespace inside a string. </p> <h3>Usage</h3> <pre> str_trim(string, side = c("both", "left", "right")) str_squish(string) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>string</code></td> <td> <p>A character vector.</p> </td></tr> <tr valign="top"><td><code>side</code></td> <td> <p>Side on which to remove whitespace (left, right or both).</p> </td></tr> </table> <h3>Value</h3> <p>A character vector. </p> <h3>See Also</h3> <p><code><a href="str_pad.html">str_pad()</a></code> to add whitespace </p> <h3>Examples</h3> <pre> str_trim(" String with trailing and leading white space\t") str_trim("\n\nString with trailing and leading white space\n\n") str_squish(" String with trailing, middle, and leading white space\t") str_squish("\n\nString with excess, trailing and leading white space\n\n") </pre> <hr /><div style="text-align: center;">[Package <em>stringr</em> version 1.4.0 <a href="00Index.html">Index</a>]</div> </body></html>