boostorg / charconv

C++11 compatible charconv

Home Page:https://www.boost.org/doc/libs/master/libs/charconv/doc/html/charconv.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add tests for leading space

Flamefire opened this issue · comments

A difference of std::from_chars to std::strto* (for both integer and float parsers) is

leading whitespace is not ignored.

I don't see that in the "invalid input" tests. I guess it makes sense to test that too.

And the documentation should cover what the input strings are expected to be. I've found the various format descriptions for floats in an extra section, but none for int. It only states stuff in terms of "matching the pattern", but for ints I wasn't able to find which pattern is used.