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

8
LINES

< > BotCompany Repo | #1013717 // indexesOfCharacters

JavaX fragment (include)

1  
static <A> L<Int> indexesOfCharacters(S s, S chars) {
2  
  new L<Int> x;
3  
  int n = l(s);
4  
  for i to n:
5  
    if (contains(chars, s.charAt(i)))
6  
      x.add(i);
7  
  ret x;
8  
}

Author comment

Began life as a copy of #1004477

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1013717
Snippet name: indexesOfCharacters
Eternal ID of this version: #1013717/1
Text MD5: dba6cfd223ef6d1cfdd19fbe98e32704
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-28 02:47:36
Source code size: 171 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 357 / 383
Referenced in: [show references]