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

5
LINES

< > BotCompany Repo | #1018477 // containsOnce - check for single occurrence of substring/elements

JavaX fragment (include)

sbool containsOnce(S a, S b) {
  int i = indexOf(a, b);
  if (i < 0) false;
  ret indexOf(a, b, i+l(b)) < 0;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1018477
Snippet name: containsOnce - check for single occurrence of substring/elements
Eternal ID of this version: #1018477/2
Text MD5: d0711d4cad154ede2e4658c1037b9306
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-10-01 18:00:12
Source code size: 114 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 335 / 356
Version history: 1 change(s)
Referenced in: [show references]