RosettaCodeData/Task/String-concatenation/Tcl/string-concatenation-3.tcl
2025-08-11 18:05:26 -07:00

6 lines
259 B
Tcl

set s "Hello"
set w "World"
set hw "$s $w" ; # "hello world"
set hw [concat $s $w] ; # {hello world}, same as above
set hw [string cat $s $w] ; # "helloworld"
set hw [join [list $s $w] " "] ; # "hello world" \w space delimiter