123456789101112131415161718 |
- / csv parser - e exclusive
- getrange: {[str;s;e] s_(e-1)#str};
- lines: 0: "tempST.csv";
- /csv parser
- parsel: {[l] comi: &l=",";comi+:1;r: 2':!#comi;r: comi@r;r: (1 2#(0;r[0;0])),r;getrange[l].'r}
- parsel'lines
- / / how the parser works
- / t: lines[0];
- / comi: &t=","; / commas idx
- / comi+:1; / help exlude commas (later use -1 on upper)
- /
- / r: 2':!#comi; / ranges of comma separated parts
- / r: comi@r; / apply ranges to comma idx
- / r: (1 2#(0;r[0;0])),r; / add 0-first comma range
- / getrange[t].'r
|