Format specifier to skip a field?
Closed this issue · 3 comments
yesint commented
First of all, thanks for an excellent library!
I'm trying to scan a file with the fields of fixed size and I need to skip some of the fields. Is it possible to reflect it somehow in the format string? Something like
scn::scan("{:f8}{:f8}{unused}{:f8}{:f8}",...);
Of course, I can do it by reading first two numbers, then manually skipping 8 chars and then reading in the last two, but this is a lot of code for such a trivial task. I can also read into a dummy unused variable, but it's kind of ugly and wastes time.
Maybe there is some other solution, which is not obvious from the docs?