Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

4
LINES

< > BotCompany Repo | #1019771 // padWithEmptyLines - pad vertically

JavaX fragment (include)

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: 202 / 232
Referenced in: [show references]