str_trim

0th

Percentile

Trim whitespace from start and end of string.

Trim whitespace from start and end of string.

Keywords
character
Usage
str_trim(string, side = "both")
Arguments
string
input character vector
side
side on which whitespace is removed (left, right or both)
Value

  • character vector with leading and trailing whitespace removed

See Also

str_pad to add whitespace

Aliases
  • str_trim
Examples
str_trim("String with trailing and leading white space\t")
str_trim("\n\nString with trailing and leading white space\n\n")
Documentation reproduced from package stringr, version 0.5, License: GPL-2

Community examples

Looks like there are no examples yet.