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.

static <A> int smartIndexOfNot(L<A> l, A sub) {
  ret smartIndexOfNot(l, sub, 0);
}

static <A> int smartIndexOfNot(L<A> l, A sub, int start) {
  int i = start, n = l(l);
  while (i < n && eq(l.get(i), sub))
    ++i;
  ret i;
}

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: 182 / 243
Version history: 1 change(s)
Referenced in: [show references]