1 | sS format3_curly(S pat, S... args) { |
2 | if (args.length == 0) return pat; |
3 | |
4 | L<S> 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, curly(argidx < args.length ? args[argidx++] : "null")); |
9 | return join(tok); |
10 | } |
Began life as a copy of #1001250
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021066 |
Snippet name: | format3_curly |
Eternal ID of this version: | #1021066/1 |
Text MD5: | 48238b1e5bacfaea80a3a2cb096d7c57 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-01-20 14:57:18 |
Source code size: | 298 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 279 / 322 |
Referenced in: | [show references] |