static S dollarVarsToStars(S s) { ret dollarVarsToStars(s, null); } static S dollarVarsToStars(S s, L<S> varNames_out) { L<S> tok = javaTok(s); for (int i = 1; i < l(tok); i += 2) { S t = tok.get(i); if (isDollarVar(t)) { listAdd(varNames_out, t); tok.set(i, "*"); } else if (eq(t, "*")) listAdd(varNames_out, "*"); } ret join(tok); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1010854 |
Snippet name: | dollarVarsToStars |
Eternal ID of this version: | #1010854/5 |
Text MD5: | 2c518f547c28ed1db148bbdb8ab354b7 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-10-04 22:39:29 |
Source code size: | 394 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 443 / 471 |
Version history: | 4 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1010859 - containsDollarVars #1017693 - dollarVarsToStars_underscores #1018260 - renameDollarVarsTo123 #1024301 - dollarVarsToFixedString #1026162 - arbitraryVarsToStars |