A CSV parser, which also works for similar formats. It doesn't support quotes, but you can escape characters using a backslash.

fn parse

fn parse*(inp: str, sep: char = ','): [][]str {

Parses input into a 2d string array.

fn encode

fn encode*(inp: [][]str, sep: char = ','): str {

Converts 2d array to csv string.