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

13
LINES

< > BotCompany Repo | #1008874 // indexOfTrim - find trimmed line

JavaX fragment (include)

1  
static int indexOfTrim(L<S> l, S a, int startIndex) {
2  
  if (l != null && a != null) {
3  
    a = trim(a);
4  
    for (int i = startIndex; i < l(l); i++)
5  
      if (eq(trim(l.get(i)), a))
6  
        ret i;
7  
  }
8  
  ret -1;
9  
}
10  
11  
static int indexOfTrim(L<S> l, S a) {
12  
  ret indexOfTrim(l, a, 0);
13  
}

Author comment

Began life as a copy of #1001878

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1008874
Snippet name: indexOfTrim - find trimmed line
Eternal ID of this version: #1008874/4
Text MD5: a6bab26c21ee02ea1b0df65af6d557ff
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-01-02 13:23:23
Source code size: 291 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 501 / 560
Version history: 3 change(s)
Referenced in: [show references]