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)

static S or2(S a, S b) {
  ret nempty(a) ? a : b;
}

static S or2(S a, S b, S c) {
  ret or2(or2(a, b), c);
}

download  show line numbers  debug dex   

Travelled to 10 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz

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: 464 / 735
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1003008 & http://1003008.tinybrain.de