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

12
LINES

< > BotCompany Repo | #1002439 // ul - make HTML list (no htmlencode)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2828L/17K).

1  
sS ul(S... list) {
2  
  ret ul(asList(list));
3  
}
4  
5  
sS ul(Cl list, O... params) {
6  
  new StringBuilder buf;
7  
  int i = indexOf(params, null); // null separates params for ul from params for li
8  
  if (i == -1) i = l(params);
9  
  for (O s : withoutNulls(list))
10  
    buf.append(tag("li", s, subArray(params, i+1))).append("\n");
11  
  ret containerTag("ul", buf, subArray(params, 0, i)) + "\n";
12  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1002439
Snippet name: ul - make HTML list (no htmlencode)
Eternal ID of this version: #1002439/8
Text MD5: 9c254d9434f3878ab31e108943f667c2
Transpilation MD5: bd5b205017f3b7eb90df1f913c45c604
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-11-16 19:28:24
Source code size: 388 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 939 / 955
Version history: 7 change(s)
Referenced in: [show references]