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

15
LINES

< > BotCompany Repo | #1008351 // addConceptIDs - transform "? - " into a new ID

JavaX fragment (include)

static S addConceptIDs(S bla) {
  L<S> lines = toLines(bla);
  bool change = false;
  for i over lines: {
    L<S> tok = javaTok(lines.get(i));
    int idx = jfind(tok, "? -");
    //print(lines.get(i) + " => " + idx);
    if (idx == 1) {
      tok.set(1, aGlobalID());
      lines.set(i, join(tok));
      change = true;
    }
  }
  ret change ? fromLines(lines) : bla;
}

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: #1008351
Snippet name: addConceptIDs - transform "? - " into a new ID
Eternal ID of this version: #1008351/5
Text MD5: b44f589abf39a836eff612e5afafd95a
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-05-09 15:09:59
Source code size: 386 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 439 / 440
Version history: 4 change(s)
Referenced in: [show references]