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   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

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: 5 / 13
Referenced in: [show references]

Formerly at http://tinybrain.de/1030664 & http://1030664.tinybrain.de