1 | sbool containsOnce(S a, S b) { |
2 | int i = indexOf(a, b); |
3 | if (i < 0) false; |
4 | ret indexOf(a, b, i+l(b)) < 0; |
5 | } |
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: | 337 / 359 |
Version history: | 1 change(s) |
Referenced in: | [show references] |