trim: Trim elements

Description Usage Arguments Value See Also Examples

Description

Trim elements

Usage

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

Arguments

x

a character vector

which

a character string specifying whether to remove both leading and trailing whitespace (default), or only leading ("left") or trailing ("right"). Can be abbreviated.

Value

A vector with trimmed strings

See Also

Other string-utils: blanks, dup, pad, replace_ext, split_path, strip_ext, strsplitN, wrap

Examples

1
2
x <- " abc\n\t" 
trim(x)

gschofl/gsmisc documentation built on May 17, 2019, 8:52 a.m.