TCL (Tool Command Language) Question:
Download Questions PDF

How do you find the length of a string without using string length command in TCL?

Answer:

set str "lenghtofthisstring"
set len 0
set list1 [ split $str "" ]
foreach value $list1 {
incr len
}
puts $len

Download TCL Interview Questions And Answers PDF

Previous QuestionNext Question
How to Swap 30 & 40 in IP address 192.30.40.1 using TCL script?How to check whether a string is palindrome or not using TCL script?