Added function to trim leading, trailing or both types of whitespace
from a string, or vector of strings.