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)

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

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: 731 / 939
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#3000382 - Answer for ferdie (>> t = 1, f = 0)