// params = relative link, HTML, relative link, HTML, ... static S hBoolSelector(bool value, S... params) { new L<S> l; for (int i = 0; i < l(params); i += 2) { bool selected = value != (i == 0); S link = params[i], html = params[i+1]; if (selected) l.add(b("[" + html + "]")); else l.add(ahref(rawSelfLink(link), html)); } ret join(" | ", l); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1014047 |
Snippet name: | hBoolSelector |
Eternal ID of this version: | #1014047/3 |
Text MD5: | 199bdf154a6f08ac6b8587f93d6447fd |
Author: | stefan |
Category: | javax / web |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-03-25 16:03:09 |
Source code size: | 395 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 387 / 430 |
Version history: | 2 change(s) |
Referenced in: | [show references] |