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

15
LINES

< > BotCompany Repo | #1004162 // jfindAll

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3315L/20K).

1  
static L<Int> jfindAll(L<S> tok, S pat, ITokCondition condition default null) {
2  
  ret jfindAll(tok, jfind_preprocess(javaTok(pat)), condition);
3  
}
4  
5  
// tokPat must be jfind_preprocess'd
6  
static L<Int> jfindAll(L<S> tok, L<S> tokPat, ITokCondition condition default null) {
7  
  TokCondition cond = toTokCondition(condition);
8  
  S[] toks = toStringArray(codeTokensOnly(tokPat));
9  
  
10  
  int i = -1;
11  
  new L<Int> l;
12  
  while ((i = findCodeTokens(tok, i+1, false, toks, cond)) >= 0)
13  
    l.add(i);
14  
  ret l;
15  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004162
Snippet name: jfindAll
Eternal ID of this version: #1004162/7
Text MD5: 1e09807d06ed7af2667af6ebc1995a5f
Transpilation MD5: bd131834d2a5120d5aed12bdda8c3854
Author: stefan
Category: javax / tokenizing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-18 15:47:33
Source code size: 507 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 599 / 953
Version history: 6 change(s)
Referenced in: [show references]