support trailing whitespace in the input number