EVOLUTION-MANAGER
Edit File: str_trunc.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: Truncate a character 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_trunc {stringr}"><tr><td>str_trunc {stringr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Truncate a character string.</h2> <h3>Description</h3> <p>Truncate a character string. </p> <h3>Usage</h3> <pre> str_trunc(string, width, side = c("right", "left", "center"), ellipsis = "...") </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>width</code></td> <td> <p>Maximum width of string.</p> </td></tr> <tr valign="top"><td><code>side, ellipsis</code></td> <td> <p>Location and content of ellipsis that indicates content has been removed.</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="str_pad.html">str_pad()</a></code> to increase the minimum width of a string. </p> <h3>Examples</h3> <pre> x <- "This string is moderately long" rbind( str_trunc(x, 20, "right"), str_trunc(x, 20, "left"), str_trunc(x, 20, "center") ) </pre> <hr /><div style="text-align: center;">[Package <em>stringr</em> version 1.4.0 <a href="00Index.html">Index</a>]</div> </body></html>