RosettaCodeData/Task/String-concatenation/Tcl/string-concatenation-3.tcl

7 lines
259 B
Tcl
Raw Permalink Normal View History

2025-08-11 18:05:26 -07:00
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