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).

static L<S> paragraphsFromText(S text) {
  LS lines = toLinesTrim2(text);
  LLS paragraphs = paragraphsFromText_groupParagraphs(lines);
  ret lmap fromLines(paragraphs);
}

static LLS paragraphsFromText_groupParagraphs(L<S> lines) {
  ret groupNonEmpty(lines, func(S line) { empty(line) });
}

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: 470 / 498
Version history: 1 change(s)
Referenced in: [show references]