1 | static S numberLines(S text) { |
2 | ret numberLines(toLines(text)); |
3 | } |
4 | |
5 | static S numberLines(L<S> lines) { |
6 | new StringBuilder buf; |
7 | int i = 1; |
8 | for (S s : lines) |
9 | buf.append((i++) + ". " + s + "\n"); |
10 | ret str(buf); |
11 | } |
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: | #1001922 |
Snippet name: | numberLines |
Eternal ID of this version: | #1001922/1 |
Text MD5: | d13de19b166260eface524efe0a3e9fa |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-10-26 16:06:43 |
Source code size: | 229 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 788 / 973 |
Referenced in: | [show references] |