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

9
LINES

< > BotCompany Repo | #1022960 // tok_moveWordToWhitespace

JavaX fragment (include)

static LS tok_moveWordToWhitespace(S word, LS tok) {
  tok = cloneList(tok);
  for (int i = 1; i < l(tok); i += 2)
    if (eqic(get(tok, i), word)) {
      replaceSubList(tok, i-1, i+2, ll(joinSubList(tok, i-1, i+2)));
      i -= 2;
    }
  ret tok;
}

Author comment

Began life as a copy of #1021988

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022960
Snippet name: tok_moveWordToWhitespace
Eternal ID of this version: #1022960/3
Text MD5: e3b09f04bc9c48fbd692c52f5bdba26f
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-15 20:23:34
Source code size: 259 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 276 / 307
Version history: 2 change(s)
Referenced in: [show references]