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

11
LINES

< > BotCompany Repo | #1022864 // find2_range - returns range(C, N)

JavaX fragment (include)

1  
static IntRange find2_range(S pat, LS tok) {
2  
  ret find2_range(parse3(pat), tok);
3  
}
4  
5  
static IntRange find2_range(LS pat, LS tok) {
6  
  for (int idx = 0; idx < tok.size(); idx += 2) {
7  
    S[] result = find2(pat, tok, idx);
8  
    if (result != null) ret intRange(idx, idx+l(pat)-2);
9  
  }
10  
  null;
11  
}

Author comment

Began life as a copy of #1022863

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: #1022864
Snippet name: find2_range - returns range(C, N)
Eternal ID of this version: #1022864/1
Text MD5: aa13bc2ad645ced8d833eac2c85f3adf
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-11 23:03:15
Source code size: 300 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 174 / 215
Referenced in: [show references]