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

7
LINES

< > BotCompany Repo | #1008687 // ai_makeVerbAction

JavaX fragment (include)

1  
static S ai_makeVerbAction(S text, L<IntRange> r) {
2  
  if (r == null) null;
3  
  if (l(r) != 1) todo();
4  
  int i = trimIndexRight(text, first(r).start);
5  
  int j = trimIndexLeft(text, first(r).end);
6  
  ret j <= i ? null : "verb=" + quote(substring(text, i, j)) + " (" + i + "/" + (j-i) + ")";
7  
}

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: 558 / 598
Referenced in: [show references]