VocabularyinterpolateInputsOutputsNone
Word descriptionString interpolation using named variables and/or stack arguments, writing to the
output-stream.
NotesStack arguments are numbered from the top of the stack, or provided anonymously by order of arguments.
ExamplesUSING: interpolate ;
"Bob" "Alice" "Hi ${1}, it's ${0}." interpolate
Hi Bob, it's Alice.
USING: interpolate namespaces ;
"Fred" "name" [ "Hi ${name}" interpolate ] with-variable
Hi Fred
USING: interpolate ;
"Mr." "Anderson"
"Hello, ${} ${}" interpolate
Hello, Mr. Anderson
See alsointerpolate>stringDefinition