scnlib icon indicating copy to clipboard operation
scnlib copied to clipboard

scan_list_ex() issue

Open mark-99 opened this issue 2 years ago • 1 comments

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).

mark-99 avatar May 27 '22 13:05 mark-99

Same issue here with 1.1.2

tbe avatar Nov 14 '22 15:11 tbe