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

9
LINES

< > BotCompany Repo | #1010452 // web_contractRelation - e.g. "has/type X" -> "has type/X"

JavaX fragment (include)

static void web_contractRelation(Web web, S rel, S dest) {
  for (Pair<WebNode> p : web_relationsOfType(web, rel)) {
    new Matches m;
    if (startsWith(web_text(p.b), dest + " ", m)) {
      web_setRelationText(p, rel + " " + dest);
      web_setText(p.b, trim(m.get(0)));
    }
  }
}

Author comment

Began life as a copy of #1010106

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: #1010452
Snippet name: web_contractRelation - e.g. "has/type X" -> "has type/X"
Eternal ID of this version: #1010452/1
Text MD5: 8611dfc3cf62a4a74790b797b07770e0
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-18 01:27:38
Source code size: 295 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 386 / 430
Referenced in: [show references]