Learn R Programming

Claddis (version 0.7.0)

trim_marginal_whitespace: Trims marginal whitespace

Description

Trims any marginal whitespace from a vector of character string(s).

Usage

trim_marginal_whitespace(x)

Value

A vector of character string(s) with any leading or trailing whitespace removed.

Arguments

x

A character string

Author

Graeme T. Lloyd graemetlloyd@gmail.com

Details

Trims any marginal whitespace (spaces or tabs) from a vector of character string(s).

Examples

Run this code

# Example string:
x <- "   \td s f\t s  "

# Trim only marginal whitespace:
trim_marginal_whitespace(x)

Run the code above in your browser using DataLab