mecha icon indicating copy to clipboard operation
mecha copied to clipboard

Delimiter seperated value parser

Open Hejsil opened this issue 4 years ago • 0 comments

Would be super nice to have a function that parses delimiter separated values (dsv) into a type. Api would be something like this:

pub fn dsv(comptime T: type, comptime delim: Parser(void)) Parser(T) {...}

It would be able to take most types and parse a dsv into that type, doing all the conversions necessary to make this happen.

Open questions:

  • Delimiter escaping?
    • Maybe out of scope as this could become arbitrarily complex.

Hejsil avatar Nov 29 '20 00:11 Hejsil