Add a helper function to trim a vector of strings