trim.space {DIZtools} | R Documentation |
Trim Spaces of a string.
Description
Removes leading and/or trailing space(s) from a character vector. By default, it removes both leading and trailing spaces.
Usage
trim.space(
x,
what = c("both", "leading", "trailing", "none"),
space.regex = "[:space:]",
...
)
Arguments
x |
a character vector which values need whitespace trimming |
what |
which part of the string should be trimmed.
Defaults to |
space.regex |
a character value containing a regex that defines a space character |
... |
additional arguments for |
Value
a character vector with (hopefully) trimmed spaces
Source
Copied from 'rapportools::is.empty()'
[Package DIZtools version 1.0.1 Index]