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

13
LINES

< > BotCompany Repo | #1029270 // lCommonPrefix_lists_ext

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

Libraryless. Click here for Pure Java version (2530L/16K).

static <A> int lCommonPrefix_lists_ext(L<A> a, L<A> b, int iB) {
  int i = 0, n = min(l(a), l(b)-iB);
  while (i < n && eq(a.get(i), b.get(iB+i)))
    ++i;
  ret i;
}

static <A> int lCommonPrefix_lists_ext(L<A> a, int iA, L<A> b, int iB) {
  int i = 0, n = min(l(a)-iA, l(b)-iB);
  while (i < n && eq(a.get(iA+i), b.get(iB+i)))
    ++i;
  ret i;
}

Author comment

Began life as a copy of #1029262

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1029270
Snippet name: lCommonPrefix_lists_ext
Eternal ID of this version: #1029270/4
Text MD5: 557ccea482c481423605473fb9cf24a8
Transpilation MD5: 9f5947f85034ccba4631a31f48e960d8
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-27 22:49:57
Source code size: 362 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 209 / 293
Version history: 3 change(s)
Referenced in: [show references]