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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -