1 | sS format3_curlyIfMultiToken(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, curlyBraceIfMultipleTokens(argidx < args.length ? args[argidx++] : "null")); |
9 | return join(tok); |
10 | } |
Began life as a copy of #1021066
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: | #1025454 |
Snippet name: | format3_curlyIfMultiToken |
Eternal ID of this version: | #1025454/1 |
Text MD5: | 3aded468720b57aaba653353d1c14a8a |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-09-29 01:29:05 |
Source code size: | 331 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 190 / 230 |
Referenced in: | [show references] |