static L<S> splitAtDashLines(S text) { L<S> lines = toLines(text); new L<S> l; int i = 0; while (i < l(lines)) { int j = indexOfDashLine(lines, i); if (j < 0) j = l(lines); if (j > i) l.add(joinLines(lines.subList(i, j))); i = j+1; } ret l; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003804 |
Snippet name: | splitAtDashLines - split at lines containing only dashes ("-"), one is enough |
Eternal ID of this version: | #1003804/4 |
Text MD5: | 7463cd11669cb11c75065b27678491aa |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-02 11:16:35 |
Source code size: | 288 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 540 / 565 |
Version history: | 3 change(s) |
Referenced in: | [show references] |