"dropLast" string function