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

10
LINES

< > BotCompany Repo | #1017724 // simpleSpaces3 - also drops Java comments

JavaX fragment (include)

static L<S> simpleSpaces3(L<S> tok) {
  tok = cloneList(tok);
  for (int i = 0; i < l(tok); i += 2)
    if (nempty(tok.get(i))) tok.set(i, " ");
  ret tok;
}

sS simpleSpaces3(S s) {
  ret empty(s) ? s : join(simpleSpaces3(javaTok(s));
}

Author comment

Began life as a copy of #1017486

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017724
Snippet name: simpleSpaces3 - also drops Java comments
Eternal ID of this version: #1017724/8
Text MD5: a2f312b31548b9dc73f681b9406dd219
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-19 22:25:57
Source code size: 246 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 302 / 340
Version history: 7 change(s)
Referenced in: [show references]