Warning: session_start(): open(/var/lib/php/sessions/sess_g02bhn3upa3i7bbbr2vl6vc6r6, 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
addSlash (append slash if none at the end and not empty) [1002881]

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

3
LINES

< > BotCompany Repo | #1002881 // addSlash (append slash if none at the end and not empty)

JavaX fragment (include)

1  
static S addSlash(S s) {
2  
  ret empty(s) || s.endsWith("/") ? s : s + "/";
3  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002881
Snippet name: addSlash (append slash if none at the end and not empty)
Eternal ID of this version: #1002881/1
Text MD5: a712f188f828d496191ac715e27fbd91
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-09-28 22:07:16
Source code size: 77 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 1191 / 1381
Referenced in: [show references]