how to combine two strings in TCL? -
i have following code in tcl:
set string1 "do firstthing" set string2 "do secondthing"
how make combine 2 strings have "do firstthing secondthing"
you can use append
this:
% set string1 "do firstthing" % set string2 "do secondthing" % append string1 " " $string2 % puts $string1 firstthing secondthing
you can put them next other...
% set string1 "do firstthing" % set string2 "do secondthing" % puts "$string1 $string2" firstthing secondthing
or if strings in list, can use join
, specify connector...
% set listofstrings [list "do firstthing" "do secondthing"] % puts [join $listofthings " "] firstthing secondthing
Comments
Post a Comment