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

10
LINES

< > BotCompany Repo | #1003993 // indexOfStartsWith

JavaX fragment (include)

1  
static int indexOfStartsWith(L<S> l, S s) {
2  
  ret indexOfStartsWith(l, s, 0);
3  
}
4  
5  
static int indexOfStartsWith(L<S> l, S s, int i) {
6  
  for (; i < l(l); i++)
7  
    if (startsWith(l.get(i), s))
8  
      ret i;
9  
  ret -1;
10  
}

Author comment

Began life as a copy of #1003980

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1003993
Snippet name: indexOfStartsWith
Eternal ID of this version: #1003993/1
Text MD5: f42c2cb8b6f54ff5eca3c1a8c902b753
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-01 22:38:53
Source code size: 222 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 618 / 613
Referenced in: [show references]