trim: Removes extra whitespaces from a string

Description Usage Arguments Value See Also Examples

Description

The function trim removes unnecessary whitespaces from a character vector.

Usage

1
trim(x)

Arguments

x

character. The character vector at stake.

Value

A character vector of the same length as x.

See Also

gsub.

Examples

1
trim(c(" a b", "Hello  World "))

bazar documentation built on May 2, 2019, 7:02 a.m.