看板Programming
标 题Re: [问题] Tcl字串的连结
发信站SayYA 资讯站 (Fri Nov 17 15:02:08 2006)
转信站ptt!ctu-reader!news.nctu!SayYa
※ 引述《[email protected] (最爱细肩带)》之铭言:
> 假设现在有个变数为$text其内容是"abc"
> 那我要将$text与字串"def"相连接要怎麽写呢?
> 我试过concat指令但是结果会变成"abc def"
> 中间会多一个空白
> 还要额外再一道指令去处理空白
> 有办法像perl一样一道命令解决的吗?
> ex. $new_text = $test."def" #(perl)
set x cc
set y dd
set z ee
set all $x$y$z
puts $all
:!./test.tcl
ccddee
--
※ Origin: SayYA 资讯站 <bbs.sayya.org>
◆ From: pc210-59-94-117.nutn.edu.tw