How do you retrieve substring from another string in QTP

Showing Answers 1 - 6 of 6 Answers

Nivedita Dhandapani

  • Jul 23rd, 2014
 

Inorder to retrieve a sub-string or a particular number of characters from any string, "Mid" function can be used.
Syntax: Mid(String, [starting position of the sub-string], [number of characters to return] )

Eg:
String1 = "Unified Functional Testing"
Result = Mid(String1, 9, 10)

The variable "Result" would contain the sub-string "Functional"

  Was this answer useful?  Yes

sneha

  • Mar 4th, 2015
 

Code
  1. span style="color: #ff0000;">"Country""ount"

  2.  

  Was this answer useful?  Yes

Bhavin

  • Oct 18th, 2016
 

Simplest Answer ever :

Code
  1. span style="color: #ff0000;">"This is the string""the string""String found""String not found"

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions