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

6
LINES

< > BotCompany Repo | #1008695 // ai_renderAction

JavaX fragment (include)

static S ai_renderAction(S text, IntRange r) {
  if (r == null) null;
  int i = trimIndexRight(text, r.start);
  int j = trimIndexLeft(text, r.end);
  ret j <= i ? null : quote(substring(text, i, j)) + " (" + i + "/" + (j-i) + ")";
}

Author comment

Began life as a copy of #1008641

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: #1008695
Snippet name: ai_renderAction
Eternal ID of this version: #1008695/1
Text MD5: 1280fee6a3c16021c843e3fb44b94a4c
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-28 19:40:34
Source code size: 238 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 517 / 552
Referenced in: [show references]