subst
subst ?-nobackslashes? ?-nocommands? ?-novariables? string
Does the substitutions of Tcl on a string: $name, [script], and backslashes. A flag turns one of them off. Use it only on text that you trust: subst runs each command in brackets.
Examples
A click on an example runs it in the shell of the page.
set n 3; subst {n is $n}:n is 3subst -nocommands {[x] $tcl_platform(engine)}:[x] ztcl
Facts
- Capability: none.
- Compute cost: one compute unit for the call, and more for the commands that it runs.