Learn R Programming

confidence (version 1.1-2)

strip_spaces: Remove Redundant Spaces

Description

This function removes redundant spaces from character vectors

Usage

strip_spaces(x)

Arguments

x

character vector

Value

character vector without trailing or multiple spaces

Examples

Run this code
stopifnot(confidence:::strip_spaces(" Hello  World  ") == "Hello World")

Run the code above in your browser using DataLab