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

16
LINES

< > BotCompany Repo | #1012574 // ai_findStuffInText

JavaX fragment (include)

1  
static O ai_findStuffInText(S s, S text) {
2  
  new Matches m;
3  
  if "* words"
4  
    if (isInteger(m.get(0))) {
5  
      int n = parseInt(m.get(0));
6  
      L<S> l = words(text);
7  
      if (l(l) == n) ret l;
8  
      L<S> l2 = ai_listWithoutOr(l);
9  
      if (l(l2) == n) ret l2;
10  
      l2 = ai_listWithoutAnd(l);
11  
      if (l(l2) == n) ret l2;
12  
      null;
13  
    }
14  
  
15  
  null;
16  
}

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: #1012574
Snippet name: ai_findStuffInText
Eternal ID of this version: #1012574/1
Text MD5: 140728ffd081c168d315cc02b33205d7
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-07 13:55:20
Source code size: 371 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 381 / 425
Referenced in: [show references]