Allow trailing spaces on strings for conversions to floating point and
integers.
There was a potential confusing error that could occur if strings with
trailing spaces were converted to integer or floating point values. This
PR allows trailing spaces in the strings that would otherwise be
convertible to the appropriate numerical type.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>