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

7
LINES

< > BotCompany Repo | #1023108 // indexOf_between

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

Libraryless. Click here for Pure Java version (48L/1K).

static <A> int indexOf_between(L<A> l, A a, int startIndex, int endIndex) {
  if (l == null) ret -1;
  for (int i = startIndex; i < endIndex; i++)
    if (eq(l.get(i), a))
      ret i;
  ret -1;
}

Author comment

Began life as a copy of #1001878

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: #1023108
Snippet name: indexOf_between
Eternal ID of this version: #1023108/1
Text MD5: febc35580ebedc8c79fbeea6f957d797
Transpilation MD5: b1258790e3c70a38e3616808d047e85a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-05 19:13:05
Source code size: 202 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 315 / 402
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)