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

5
LINES

< > BotCompany Repo | #1030664 // replaceDollarVars2 - does not use a tokenizer. also supports ${name}

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3045L/18K).

sS replaceDollarVars2(S s, O... params) {
  if (empty(params)) ret s;
  MapSO vars = mapKeys dropDollarPrefix((MapSO) litcimap(params));
  ret replaceDollarVars2_dyn(s, var -> strOrNull(vars.get(var)));
}

Author comment

Began life as a copy of #1028680

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030664
Snippet name: replaceDollarVars2 - does not use a tokenizer. also supports ${name}
Eternal ID of this version: #1030664/1
Text MD5: a445fe50bd945fbcf4517ddd7aa20333
Transpilation MD5: 7d083b187d7a1547c88dfa7980fb499c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-02-22 13:05:27
Source code size: 208 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 236 / 329
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1030949 - Transpiler output of #1031393