How do you check whether a string is palindrome or not using TCL script?
Answer Posted / nagendra prasath
proc palindrome {iStr} {
if {[ string match -nocase $iStr [string reverse $iStr]]} {
puts "Palindrome"
} else {
puts "Not a Palindrome"
}
}
palindrome "Sator Arepo Tenet Opera Rotas"
Palindrome
| Is This Answer Correct ? | 19 Yes | 10 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category