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

18
LINES

< > BotCompany Repo | #1022867 // PJFindAttractor

JavaX fragment (include)

1  
// uses jfind (case-insensitive)
2  
sclass PJFindAttractor > PartialAttractor {
3  
  S pattern;
4  
  TokCondition condition;
5  
  S[] tokens;
6  
  
7  
  *(S *pattern) {}
8  
  *(S *pattern, TokCondition *condition) {}
9  
10  
  public bool find() { 
11  
    if (tokens == null)
12  
      tokens = javaTokForJFind_array(pattern);
13  
    int i = findCodeTokens(tok, 0, true, tokens, condition);
14  
    if (i < 0) false;
15  
    matchedRange = intRange(i, i+l(tokens)*2-1);
16  
    true;
17  
  }
18  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022867
Snippet name: PJFindAttractor
Eternal ID of this version: #1022867/4
Text MD5: 0bcc568e0d0c7898549ba6a7d4114645
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-12 16:38:51
Source code size: 456 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 303 / 753
Version history: 3 change(s)
Referenced in: [show references]