R/strip.R

strip <-
    function                  # ' Remove leading and trailing whitespace
(
    s                                   # ^ String
)
{
    as.character(sapply(s, function(x)
                        gsub("^\\s+", "", gsub("\\s+$", "", x))))
}                  # ^ String without leading and trailing whitespace
michelk/logbuch.R documentation built on May 22, 2019, 9:55 p.m.