Learn R Programming

genArise (version 1.48.0)

trim: Trim

Description

Extract white spaces at the begining or end of a word.

Usage

trim(word)

Arguments

word
A string of characters posibly with white spaces at the beging or end of the string.

Value

Returns a string of characters, with leading and trailing whitespace omitted.

Examples

Run this code

trim("        This is a String            ")
## return [1] "This is a String"

Run the code above in your browser using DataLab