Libraryless. Click here for Pure Java version (2530L/16K).
1 | static <A> int lCommonPrefix_lists_ext(L<A> a, L<A> b, int iB) {
|
2 | int i = 0, n = min(l(a), l(b)-iB); |
3 | while (i < n && eq(a.get(i), b.get(iB+i))) |
4 | ++i; |
5 | ret i; |
6 | } |
7 | |
8 | static <A> int lCommonPrefix_lists_ext(L<A> a, int iA, L<A> b, int iB) {
|
9 | int i = 0, n = min(l(a)-iA, l(b)-iB); |
10 | while (i < n && eq(a.get(iA+i), b.get(iB+i))) |
11 | ++i; |
12 | ret i; |
13 | } |
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: | 429 / 551 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |