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

12
LINES

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

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

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

// Use like this: renderVars(+x, +y)
sS mapMethodLike renderVars_str(O... params) {
  new LS l;
  int i = 0;
  if (odd(l(params))) {
    l.add(strOrNull(first(params)));
    ++i;
  }
  for (; i+1 < l(params); i += 2)
    l.add(params[i] + "=" + params[i+1]);
  ret trim(joinWithComma(l));
}

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/5
Text MD5: 7cadc0657970d6455e44c76e0ed1ac51
Transpilation MD5: 9d64d2b2ef014d365d49113102e87bf0
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-16 17:54:06
Source code size: 301 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 103 / 154
Version history: 4 change(s)
Referenced in: [show references]