Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我得到了答案,因为 1 我试过这个:
set a "Amazon" set b [split $a] set c [llength $b] puts "$c"
我相信你可以使用string length:
string length
set a "Amazon" set lengthOfA [string length $a] puts "Length is: $lengthOfA"
set a "amazon" set a [split "$a" ""] puts [llength $a]