1 | static SS parseTag2Answer(S snippetID) {
|
2 | SS map = new LinkedHashMap; |
3 | for (S s : toLinesFullTrim(loadSnippet(snippetID))) {
|
4 | L<S> tok = javaTok(s); |
5 | if (eq(get(tok, 3), "-") && isInteger(get(tok, 1))) |
6 | s = trim(join(subList(tok, 4))); |
7 | int i = s.indexOf("=>");
|
8 | if (i < 0) { print("? " + s); continue; }
|
9 | S tag = trim(substr(s, 0, i)); |
10 | S text = trim(substr(s, i+2)); |
11 | map.put(tag, text); |
12 | } |
13 | ret map; |
14 | } |
Began life as a copy of #1008364
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1008368 |
| Snippet name: | parseTag2Answer |
| Eternal ID of this version: | #1008368/1 |
| Text MD5: | ae0c425e735099899acffc322e3bc555 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-05-09 22:18:56 |
| Source code size: | 447 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 639 / 707 |
| Referenced in: | [show references] |