Open raehik opened 7 months ago
I found myself wanting this in a library where I define arbitrary null-padded data. I parse a value of the type, then parse(/skip) nulls until a given size is reached. For that, I need to check how many bytes the parser consumed. (Previously I was doing something silly, now I'm taking a second look I realize I should be using such a combinator.)
Returns parse result along with number of bytes consumed. Maybe useful for low level binary parsing.