trim_anything(string, pattern, side = "both")
A string.
A string. The pattern to be trimmed (not interpreted as
regular expression). So to trim a period, use char = "."
and not
char = "\\."
).
Which side do you want to trim from? "both"
is the
default, but you can also have just either "left"
or "right"
(or optionally the shortened "b"
, "l"
and "r"
).