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

5
LINES

< > BotCompany Repo | #1016109 // dropAfterSlash - also drops the slash & rtrims

JavaX fragment (include)

static S dropAfterSlash(S s) {
  if (s == null) null;
  int i = s.indexOf('/');
  ret i < 0 ? s : rtrim(substring(s, 0, i));
}

Author comment

Began life as a copy of #1007058

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: #1016109
Snippet name: dropAfterSlash - also drops the slash & rtrims
Eternal ID of this version: #1016109/1
Text MD5: d1576d200cc95a713e50b07ce1ab2a72
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-06 12:34:52
Source code size: 130 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 341 / 376
Referenced in: [show references]