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

14
LINES

< > BotCompany Repo | #1004162 - jfindAll

JavaX fragment (include)

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

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

download  show line numbers  debug dex   

Travelled to 10 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1004162
Snippet name: jfindAll
Eternal ID of this version: #1004162/3
Text MD5: 12fb85745d0b2589a081ad36cd6b00da
Author: stefan
Category: javax / tokenizing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-22 01:58:51
Source code size: 364 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 360 / 641
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1004162 & http://1004162.tinybrain.de