1 | sS padWithEmptyLines(S s, int n) { |
2 | int x = countLines(s); |
3 | ret x >= n ? s : s + rep('\n', n-x); |
4 | } |
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: | 274 / 305 |
Referenced in: | [show references] |