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

10
LINES

< > BotCompany Repo | #1024699 // smartIndexOfNot

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

Transpiled version (1649L) is out of date.

1  
static <A> int smartIndexOfNot(L<A> l, A sub) {
2  
  ret smartIndexOfNot(l, sub, 0);
3  
}
4  
5  
static <A> int smartIndexOfNot(L<A> l, A sub, int start) {
6  
  int i = start, n = l(l);
7  
  while (i < n && eq(l.get(i), sub))
8  
    ++i;
9  
  ret i;
10  
}

Author comment

Began life as a copy of #1002497

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1024699
Snippet name: smartIndexOfNot
Eternal ID of this version: #1024699/2
Text MD5: c6dfd3292d7b767847951bfc3d3a418c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-24 09:49:53
Source code size: 238 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 184 / 245
Version history: 1 change(s)
Referenced in: [show references]