Il metodo trim() toglie gli spazi presenti in testa ed in coda in una stringa e non gli elementi vontenenti stringa vuota in un vettore.