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

14
LINES

< > BotCompany Repo | #1027857 // jfindAllIC

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

Libraryless. Click here for Pure Java version (3017L/19K).

static L<Int> jfindAllIC(L<S> tok, S pat) {
  ret jfindAllIC(tok, jfind_preprocess(javaTok(pat)));
}

// tokPat must be jfind_preprocess'd
static L<Int> jfindAllIC(L<S> tok, L<S> tokPat) {
  S[] toks = toStringArray(codeTokensOnly(tokPat));
  
  int i = -1;
  new L<Int> l;
  while ((i = findCodeTokens(tok, i+1, true, toks)) >= 0)
    l.add(i);
  ret l;
}

Author comment

Began life as a copy of #1004162

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1027857
Snippet name: jfindAllIC
Eternal ID of this version: #1027857/1
Text MD5: b3ba603b66374cee8909be16d7a2a1c8
Transpilation MD5: 59bbee66717a670538508a963d850207
Author: stefan
Category: javax / tokenizing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-16 11:46:48
Source code size: 369 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 105 / 181
Referenced in: [show references]