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

9
LINES

< > BotCompany Repo | #1013719 // splitAfterChars_trim

JavaX fragment (include)

static L<S> splitAfterChars_trim(S chars, S s) {
  new L<S> out;
  L<int> l = indexesOfCharacters(s, chars);
  addFirstUnlessThere(l, 0);
  addUnlessThere(l, l(s));
  for (int i = 0; i+1 < l(l); i++)
    addIfNempty(out, trim(substring(s, l.get(i)+1, l.get(i+1))));
  ret out;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1013719
Snippet name: splitAfterChars_trim
Eternal ID of this version: #1013719/4
Text MD5: a4c7da8d3d648c6dcf318f5f1b28c307
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-28 03:05:09
Source code size: 286 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 329 / 373
Version history: 3 change(s)
Referenced in: [show references]