collapseWS: Collapse all white space blocks into a single space

Description Usage Arguments Value Note Examples

View source: R/strings.R

Description

Collapse all white space blocks into a single space

Usage

1

Arguments

str

a character or character vector

Value

A character or character vector with only single spaces

Note

This has a recursive implementation, so should not be used to remove spaces of extreme length

Examples

1
collapseWS("hello    world") # "hello world"

mattgarber4/myUtils documentation built on Dec. 13, 2020, 12:54 p.m.