static <A> S joinWithCommaOr(S def, Collection<A> c) { ret nempty(c) ? joinWithComma(c) : def; } static <A> S joinWithCommaOr(Collection<A> c, S def) { ret joinWithCommaOr(def, c); }
Began life as a copy of #1009156
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023744 |
Snippet name: | joinWithCommaOr - join with ", " separator, return alternative string when list is empty |
Eternal ID of this version: | #1023744/4 |
Text MD5: | 4cb34dfbf43d0a2f92bdd8e8a823071d |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-01 20:03:28 |
Source code size: | 189 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 251 / 302 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |