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

13
LINES

< > BotCompany Repo | #1024543 // renderVars_str - don't use struct

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

Transpiled version (3119L) is out of date.

1  
// Use like this: renderVars(+x, +y)
2  
// Or like this: renderVars("bla", +x, +y)
3  
sS mapMethodLike renderVars_str(O... params) {
4  
  new LS l;
5  
  int i = 0;
6  
  if (odd(l(params))) {
7  
    l.add(strOrNull(first(params)));
8  
    ++i;
9  
  }
10  
  for (; i+1 < l(params); i += 2)
11  
    l.add(params[i] + "=" + params[i+1]);
12  
  ret trim(joinWithComma(l));
13  
}

Author comment

Began life as a copy of #1010650

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024543
Snippet name: renderVars_str - don't use struct
Eternal ID of this version: #1024543/6
Text MD5: b92a4051f7e0b7313bbeadd04eaad69a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-22 23:29:30
Source code size: 345 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 207 / 320
Version history: 5 change(s)
Referenced in: [show references]