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

15
LINES

< > BotCompany Repo | #1013009 // ai_getTriplePart

JavaX fragment (include)

// position = 1 to 3
static Symbol ai_getTriplePart(S tripleID, int position) {
  TripleWeb t = ai_getTriple(tripleID);
  ret t == null ? null : tripleGet(t, position-1);
}

// e.g. "bdmvnpnkmkoecjyt/a"
static Symbol ai_getTriplePart(S triplePartID) {
  L<S> l = splitAtSlash(triplePartID);
  if (l(l) != 2) null;
  S tripleID = first(l), pos = second(l);
  int iPos = charDiff(lower(pos), 'a');
  TripleWeb t = ai_getTriple(tripleID);
  ret t == null ? null : tripleGet(t, iPos);
}

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: #1013009
Snippet name: ai_getTriplePart
Eternal ID of this version: #1013009/3
Text MD5: 16218e087dade9f317adada8a29e81eb
Author: stefan
Category: javax / chat
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-06 05:50:45
Source code size: 498 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 371 / 391
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)