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

10
LINES

< > BotCompany Repo | #1010124 // web_dropSecondWord - drop second word of node text if it matches

JavaX fragment (include)

static void web_dropSecondWord(Web web, S word) {
  for (WebNode node : web_nonRelationNodes(web)) {
    S text = node.text();
    L<S> words = words2(text);
    if (eqic(get(words, 1), word)) {
      words.remove(1);
      web_setText(node, joinWithSpaces(words));
    }
  }
}

Author comment

Began life as a copy of #1010103

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: #1010124
Snippet name: web_dropSecondWord - drop second word of node text if it matches
Eternal ID of this version: #1010124/1
Text MD5: a5f0d374296ad73d481fe4c9c14d735c
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-03 23:15:07
Source code size: 286 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 368 / 395
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1010125 - web_replaceFirstWord