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

7
LINES

< > BotCompany Repo | #1030434 // test_replaceDollarVars (OK)

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

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

svoid test_replaceDollarVars() {
  assertEqualsVerbose("Hello Chris Guy $what",
    replaceDollarVars("Hello $firstName $lastName $what", firstName := "Chris", $lastName := "Guy"));
  assertEqualsVerbose("Hello Stefan, what's up",
    replaceDollarVars_dyn("Hello $userName, what's up", var
      -> eq(var, "userName") ? "Stefan" : null));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1030434
Snippet name: test_replaceDollarVars (OK)
Eternal ID of this version: #1030434/3
Text MD5: a21e7bed07d79c4b2d6a6dbe2624bb61
Transpilation MD5: 4031368dfdd1e770a0566e63f93c8650
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-12-21 01:32:18
Source code size: 348 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 285 / 353
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1030663 - test_replaceDollarVars2 (OK)