Libraryless. Click here for Pure Java version (3099L/20K).
sL formatWithFragmentsAndDollarSymVars_asList(S starPattern, O... args) { LS tok = javaTok(starPattern); int iArg = 0, i = 1; new L out; while (i < l(tok)) { int j = smartIndexOfAsteriskOrDollarVar(tok, i); if (j > i) out.add(Fragment(joinSubList(tok, i, j-1))); if (j < l(tok)) { S t = tok.get(j); if (eq(t, "*")) out.add(get(args, iArg++)); else out.add(SymVar(t)); } i = j+2; } ret out; }
Began life as a copy of #1027879
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: | #1028750 |
Snippet name: | formatWithFragmentsAndDollarSymVars_asList |
Eternal ID of this version: | #1028750/1 |
Text MD5: | 7e50e9c6f3c9a76551322ec19664efe3 |
Transpilation MD5: | df76e6e786457eaad43b60a4f5f3b4c2 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-07 00:13:45 |
Source code size: | 481 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 216 / 302 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |