cleanSpaces: Drop leading, trailing and repeated spaces in character...

View source: R/cleanSpaces.R

cleanSpacesR Documentation

Drop leading, trailing and repeated spaces in character strings

Description

Drop leading, trailing and repeated spaces in character strings

Usage

cleanSpaces(x, double = TRUE, lead = TRUE, trail = TRUE)

Arguments

x

A vector of character strings to modify

double

Replace any number of consecutive blank spaces by a single blank. Default is TRUE.

lead

Drop spaces before first non-empty character. Default is TRUE.

trail

Drop spaces after last non-empty character. Default is TRUE.

Value

A vector of class character


philipdelff/NMdata documentation built on March 5, 2025, 12:20 a.m.