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

6
LINES

< > BotCompany Repo | #1030098 // dropEmptyLines

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2749L/17K).

1  
sS dropEmptyLines(S text) {
2  
  new LS lines;
3  
  for (S line : lines(text))
4  
    if (nempty(line)) lines.add(line);
5  
  ret lines_possiblyRTrim(lines, text);
6  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030098
Snippet name: dropEmptyLines
Eternal ID of this version: #1030098/2
Text MD5: 438399fe5d218757a7da0246885ec31e
Transpilation MD5: ada633f2a55c3f77c19140a8296a25b0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-09 10:17:48
Source code size: 158 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 202 / 286
Version history: 1 change(s)
Referenced in: [show references]