A function to remove leading/trailing whitespace
Usage
sf_trim(subject, which = c("both", "left", "right"), whitespace = "[ \\t\\r\\n]", ...)Examples
if(getRversion() >= "3.5.0") {
x <- c(" alpha ", " beta", " gamma ", "delta ", "epsilon ")
sf_trim(x)
}
#> [1] "alpha" "beta" "gamma" "delta" "epsilon"