Remove leading, trailing (and, if requested, duplicate) spaces
hsTrim(str, trim.multiple.spaces = TRUE, dbg = FALSE)
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 |
input string str without leading or trailing spaces and with multiple consecutive spaces being replaced by a single space