Learn R Programming

plan (version 0.1.0)

trim.whitespace: Trim leading/trailing whitespace from character strings

Description

Trim leading and trailing whitespace from character strings. Used by read.gantt and read.burndown.

Usage

trim.whitespace(x)

Arguments

x
a character string, or vector of character strings.

Value

  • As x, but with leading and trailing space removed

Examples

Run this code
library(plan)
x <- c("hellow there", "ba bye   ", "buddy   ")
print(x)
print(trim.whitespace(x))

Run the code above in your browser using DataLab