str_trim | R Documentation |
str_trim()
removes whitespace from start and end of string;
str_squish()
also reduces repeated whitespace inside a string.
str_trim(string, side = c("both", "left", "right")) str_squish(string)
string |
|
side |
|
Returns a character vector
the same length as string
.
str_pad()
to add whitespace
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.