scnlib
scnlib copied to clipboard
scan_list_ex() issue
This is pretty much an exact example from the docs:
std::vector<std::string> vec;
auto result = scn::scan_list_ex("123, 456,\n789", vec, scn::list_separator_and_until(',', '\n'));
The (unexpected) result is that the vector contains 2 elements "123," and "456," (ie the comma is in the result string).
If I change the input string to "123,456,\n789"
(ie remove the space) the output is 1 element of "123,456,"
. So it looks a lot like it's just splitting at the whitespace.
I'm using v1.0 (latest available in vcpkg).
Same issue here with 1.1.2