added a string shortening function to the string utilities