I have a set of strings, some of which are quite long, for example:
movie.titles <- c("Il divo: La spettacolare vita di Giulio Andreotti","Defiance","Coco Before Chanel","Happy-Go-Lucky","Up","The Imaginarium of Doctor Parnassus")
Now I would like to trim these lines with a maximum of, say, 30 characters, but in such a way that no words are split in the process and ideally such that if a line of truncated ellipses is added to the end of the line.
source share