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

7
LINES

< > BotCompany Repo | #1003008 // or2 function - return string or default value if string is empty (=null or "")

JavaX fragment (include)

1  
static S or2(S a, S b) {
2  
  ret nempty(a) ? a : b;
3  
}
4  
5  
static S or2(S a, S b, S c) {
6  
  ret or2(or2(a, b), c);
7  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1003008
Snippet name: or2 function - return string or default value if string is empty (=null or "")
Eternal ID of this version: #1003008/2
Text MD5: e9f153f5079a39a70a160fabffe8f817
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-02-27 10:33:22
Source code size: 115 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 903 / 1222
Version history: 1 change(s)
Referenced in: [show references]