Strip whitespace (or other characters) from the end
of a string