Warning: session_start(): open(/var/lib/php/sessions/sess_tge1818c76hvfat19nkjpifn1p, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51

Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
dropAfterLastSlash - also drops the slash [1007058]

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

5
LINES

< > BotCompany Repo | #1007058 // dropAfterLastSlash - also drops the slash

JavaX fragment (include)

1  
static S dropAfterLastSlash(S s) {
2  
  if (s == null) null;
3  
  int i = s.lastIndexOf('/');
4  
  ret i < 0 ? s : rtrim(substring(s, 0, i));
5  
}

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: #1007058
Snippet name: dropAfterLastSlash - also drops the slash
Eternal ID of this version: #1007058/3
Text MD5: 2e030ad4a9e888b407fa9e04263fc75f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-15 18:14:59
Source code size: 138 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 936 / 938
Version history: 2 change(s)
Referenced in: [show references]