trimws: Backport of trimws for R < 3.3.0

Description Usage Examples

View source: R/trimws.R

Description

See the original description in base::trimws.

Usage

1
trimws(x, which = c("both", "left", "right"))

Examples

1
2
3
4
5
6
# get function from namespace instead of possibly getting
# implementation shipped with recent R versions:
bp_trimws = getFromNamespace("trimws", "backports")
bp_trimws(c("  a  ", "b  ", "  c"))

bp_trimws(c("  a  ", "b  ", "  c"), which = "left")

backports documentation built on Sept. 26, 2017, 1:05 a.m.

Related to trimws in backports...