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

7
LINES

< > BotCompany Repo | #1008687 // ai_makeVerbAction

JavaX fragment (include)

static S ai_makeVerbAction(S text, L<IntRange> r) {
  if (r == null) null;
  if (l(r) != 1) todo();
  int i = trimIndexRight(text, first(r).start);
  int j = trimIndexLeft(text, first(r).end);
  ret j <= i ? null : "verb=" + 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: #1008687
Snippet name: ai_makeVerbAction
Eternal ID of this version: #1008687/1
Text MD5: d163dea5a43295e7a01dd6100568e40c
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 16:17:30
Source code size: 293 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 483 / 523
Referenced in: [show references]