Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Saturday 5 January 2019

Finding whether a string is Palindrome or Not

Method- 1
-----------------------------------

Xstring=inputbox("enter a string")

if xString= strreverse(xString) then
  msgbox "Its a Palindrome"
else
  msgbox "Its NOT a Palindrome"
End if

Method-2
----------------------------------------

MyStr=Ucase(inputbox("Enter the String:"))
RevStr=strreverse(MyStr)

if strcomp(MyStr,RevStr)=0 then
   msgbox "It is a Palindrome"
else
   msgbox "It is not a Palindrome"
end if





No comments:

Post a Comment

Note: only a member of this blog may post a comment.