请问用tcl怎样找出一个字符串中有多少个hello?
时间:10-02
整理:3721RD
点击:
还望高手解答一下,最好能有代码,谢谢
set i 0; set j 0; set b {hello}
while { [string first $b $c $i] >=0 } {incr j ; set i [string first $b $c $i];
incr i}
puts $j
看看。
