Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1024301 // dollarVarsToFixedString

JavaX fragment (include)

sS dollarVarsToFixedString(S replacement, 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, replacement);
    }
  }
  ret join(tok);
}

Author comment

Began life as a copy of #1010854

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: #1024301
Snippet name: dollarVarsToFixedString
Eternal ID of this version: #1024301/1
Text MD5: f553d5335ff57516c393bd1d9a1d7e30
Author: stefan
Category: javax / parsing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-30 22:52:25
Source code size: 286 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 169 / 196
Referenced in: [show references]