hsTrim: Remove Leading and Trailing Spaces

View source: R/string.R

hsTrimR Documentation

Remove Leading and Trailing Spaces

Description

Remove leading, trailing (and, if requested, duplicate) spaces

Usage

hsTrim(str, trim.multiple.spaces = TRUE, dbg = FALSE)

Arguments

str

vector of character containing the strings to be trimmed

trim.multiple.spaces

if TRUE (default), multiple consecutive spaces are replaced by one space

dbg

if TRUE (the default is FALSE) debut messages are shown

Value

input string str without leading or trailing spaces and with multiple consecutive spaces being replaced by a single space


KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.