sS padWithEmptyLines(S s, int n) { int x = countLines(s); ret x >= n ? s : s + rep('\n', n-x); }
download show line numbers debug dex old transpilations
Travelled to 10 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019771 |
Snippet name: | padWithEmptyLines - pad vertically |
Eternal ID of this version: | #1019771/1 |
Text MD5: | b1318d0780545313941d952f2203f5f5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-25 14:43:49 |
Source code size: | 103 bytes / 4 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 275 / 305 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |