0

我得到了答案,因为 1 我试过这个:

set a "Amazon"
set b [split $a]
set c [llength $b]
puts "$c"
4

2 回答 2

5

我相信你可以使用string length

set a "Amazon"
set lengthOfA [string length $a]
puts "Length is: $lengthOfA"
于 2013-08-07T00:01:13.643 回答
0
set a "amazon"
set a [split "$a" ""]
puts [llength $a]
于 2013-08-08T04:22:08.983 回答