sf_trim {stringfish} | R Documentation |
sf_trim
Description
A function to remove leading/trailing whitespace
Usage
sf_trim(subject, which = c("both", "left", "right"), whitespace = "[ \\t\\r\\n]", ...)
Arguments
subject |
A character vector |
which |
"both", "left", or "right" determines which white space is removed |
whitespace |
Whitespace characters (default: "[ \\t\\r\\n]") |
... |
Parameters passed to sf_gsub |
Value
A stringfish vector of trimmed whitespace
See Also
trimws
Examples
if(getRversion() >= "3.5.0") {
x <- c(" alpha ", " beta", " gamma ", "delta ", "epsilon ")
sf_trim(x)
}
[Package stringfish version 0.16.0 Index]