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

5
LINES

< > BotCompany Repo | #1015295 - smartLastIndexOf - returns l(s) if not found

JavaX fragment (include)

static int smartLastIndexOf(S s, char c) {
  if (s == null) ret 0;
  int i = s.lastIndexOf(c);
  ret i >= 0 ? i : l(s);
}

Author comment

Began life as a copy of #1002497

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, ofpaelxlmzfo, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1015295
Snippet name: smartLastIndexOf - returns l(s) if not found
Eternal ID of this version: #1015295/2
Text MD5: d0792708729f8ecaa3fc588d987ad308
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-11 14:21:46
Source code size: 125 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 109 / 147
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1015295 & http://1015295.tinybrain.de