static L<S> standAloneLines(L<S> lines) { new L<S> l; for i over lines: { if (nempty(get(lines, i)) && emptyAfterTrim(get(lines, i-1)) && emptyAfterTrim(get(lines, i+1))) l.add(get(lines, i)); } ret l; }
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: | #1014359 |
Snippet name: | standAloneLines - lines with empty lines above and below (or at beginning or end) |
Eternal ID of this version: | #1014359/1 |
Text MD5: | d4880fff1ffd94a445232aef54237757 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-20 14:52:03 |
Source code size: | 242 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 458 / 445 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |