NAME
SurroundEach — Make a new list by surrounding each element with a string.
SYNOPSIS
SurroundEach ListVariable String
DESCRIPTION
Return Value
A list where each element comes from one in the input list, except it is surrounded by the string.
Arguments
ListVariableThe input list from which to take elements and surround. Can be either a value or @VarName (will upvar and read/write).
StringWhat to surround each list element with.
More Info
Note that arguments of the form XxxVariable can take either a normal value or the name of a variable to read/write, prefixed by @. See About Using @ for details.

For information regarding exceptions / errors, see here.
EXAMPLES

This is how to surround each list element with double stars.

% set MyList [list first second third]
first second third
% SurroundEach $MyList "**"
**first** **second** **third**
% set MyList [list first second third]
first second third
% SurroundEach @MyList "**"
**first** **second** **third**
% puts $MyList
**first** **second** **third**
KEYWORDS
conversion, list, string, transform