removes specified characters from a string