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

6
LINES

< > BotCompany Repo | #1006473 // dropStartingFromLast - a string function

JavaX fragment (include)

1  
static S dropStartingFromLast(S a, S b) {
2  
  if (a == null) null;
3  
  if (b == null) ret a;
4  
  int i = a.lastIndexOf(b);
5  
  ret i < 0 ? a : substring(a, 0, i);
6  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006473
Snippet name: dropStartingFromLast - a string function
Eternal ID of this version: #1006473/1
Text MD5: f295e74d3fcb3fc857f5113cdb63d7ff
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-01-09 15:05:24
Source code size: 161 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 491 / 527
Referenced in: [show references]