trim {gregmisc}R Documentation

Remove leading and trailing spaces from character strings

Description

Remove leading and traling spaces from character strings

Usage

trim(s)

Arguments

s character string(s) to be processed

Value

Elements of s with all leading and traling spaces removed.

Author(s)

Gregory R. Warnes gregory_r_warnes@groton.pfizer.com

See Also

sub, gsub

Examples

s <- "    this is an example string    "
trim(s)

[Package Contents]