Faster way to trim a long character vector in R | Hacker News Reader