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

6
LINES

< > BotCompany Repo | #1017486 // simpleSpaces2 - only convert whitespace, leave all other punctuation alone

JavaX fragment (include)

static L<S> simpleSpaces2(L<S> tok) {
  tok = cloneList(tok);
  for (int i = 0; i < l(tok); i += 2)
    tok.set(i, tok.get(i).replaceAll("\\s+", " "));
  ret tok;
}

Author comment

Began life as a copy of #1001975

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: #1017486
Snippet name: simpleSpaces2 - only convert whitespace, leave all other punctuation alone
Eternal ID of this version: #1017486/4
Text MD5: 7a85f2bb29db1e47d68183b9ac09a34e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-09-01 00:40:20
Source code size: 169 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 262 / 303
Version history: 3 change(s)
Referenced in: [show references]