Learn R Programming

stringb (version 0.1.17)

text_trim: trim spaces

Description

trim spaces

trim spaces default

trim spaces list

trim spaces numeric

Usage

text_trim(string, side = c("both", "left", "right"), pattern = " ", ...)

# S3 method for default text_trim(string, side = c("both", "left", "right"), pattern = " ", ...)

# S3 method for list text_trim(string, side = c("both", "left", "right"), pattern = " ", ...)

# S3 method for numeric text_trim(string, side = c("both", "left", "right"), pattern = " ", ...)

Arguments

string

text to be trimmed

side

defaults to both might also be left, right, both or b, r, l to express where to trim pattern away

pattern

regex to look for

...

further arguments passed through to text_replace()