str_trim

0th

Percentile

Trim whitespace from start and end of string.

Trim whitespace from start and end of string.

Usage
str_trim(string, side = c("both", "left", "right"))
Arguments
string
A character vector.
side
Side on which to remove whitespace (left, right or both).
Value

A character vector.

See Also

str_pad to add whitespace

Aliases
  • str_trim
Examples
library(stringr) 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 1.1.0, License: GPL-2

Community examples

Looks like there are no examples yet.