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

9
LINES

< > BotCompany Repo | #1005150 // paragraphsFromText

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

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

1  
static L<S> paragraphsFromText(S text) {
2  
  LS lines = toLinesTrim2(text);
3  
  LLS paragraphs = paragraphsFromText_groupParagraphs(lines);
4  
  ret lmap fromLines(paragraphs);
5  
}
6  
7  
static LLS paragraphsFromText_groupParagraphs(L<S> lines) {
8  
  ret groupNonEmpty(lines, func(S line) { empty(line) });
9  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1005150
Snippet name: paragraphsFromText
Eternal ID of this version: #1005150/2
Text MD5: b2725cd805e7c4a71eaf1ef27b8d260d
Transpilation MD5: 857934e4a655dbc2c44f8d58daf53bfd
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-22 07:33:22
Source code size: 300 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 536 / 585
Version history: 1 change(s)
Referenced in: [show references]