1 | static L<SS> parseCSV_unquote(S csv) { |
2 | L<S> lines = toLines(csv); |
3 | new L<SS> l; |
4 | if (nempty(lines)) { |
5 | L<S> fields = tok_splitAtComma_unquote(first(lines)); |
6 | for (S s : dropFirst(lines)) { |
7 | SS line = litorderedmap(); |
8 | L<S> data = tok_splitAtComma_unquote(s); |
9 | for i over data: |
10 | line.put(get(fields, i), data.get(i)); |
11 | l.add(line); |
12 | } |
13 | } |
14 | ret l; |
15 | } |
Began life as a copy of #1008333
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008392 |
Snippet name: | parseCSV_unquote - CSV to L<SS> - with header - unquotes elements |
Eternal ID of this version: | #1008392/2 |
Text MD5: | 24fb5589cfcb654342d3debead10443e |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-30 13:59:51 |
Source code size: | 402 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 452 / 497 |
Version history: | 1 change(s) |
Referenced in: | [show references] |