Libraryless. Click here for Pure Java version (2346L/15K).
1 | sS format_quoteAll(S pat, O... args) { |
2 | if (args.length == 0) ret pat; |
3 | |
4 | LS tok = javaTok(pat); |
5 | int argidx = 0; |
6 | for (int i = 1; i < tok.size(); i += 2) |
7 | if (tok.get(i).equals("*")) |
8 | tok.set(i, quote(argidx < args.length ? args[argidx++] : "null")); |
9 | ret join(tok); |
10 | } |
Began life as a copy of #1001250
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1026623 |
Snippet name: | format_quoteAll |
Eternal ID of this version: | #1026623/1 |
Text MD5: | 70142193d040827f56299eceba5a6645 |
Transpilation MD5: | 86e9ee1346f4ab7be987a38c26c2f950 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-01-16 19:17:08 |
Source code size: | 292 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 196 / 285 |
Referenced in: | [show references] |