ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
Is there a function to find the number of occurrences of sub
strings within a string?
 Question Submitted By :: Uday Kumar_anem
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Is there a function to find the number of occurrences of sub strings within a string?
Answer
# 1
The below function returns number of occurrences of sub
string within a string

Function SubStrOccur(Str, SubStr)
  Occr = split(Str, SubStr)
  SubStrOccur = ubound(Occr)
End Function

Scenario 1:

Str = "SairamSairam Sairam"
SubStr = "Sai"
msgbox "Given SubString("&SubStr&") appeared "&SubStrOccur
(Str, SubStr)&" time(s) in given String("&Str&")"

Function return 3 (bcz "Sai" appears 3 times in the given 
string.)



Scenario 2:

Str = "SairamSairam Sairam"
SubStr = "sai"
msgbox "Given SubString("&SubStr&") appeared "&SubStrOccur
(Str, SubStr)&" time(s) in given String("&Str&")"

Function return 0 (bcz here "sai" is in small letters 
doesn't appear in the given string.)
 
Is This Answer Correct ?    1 Yes 0 No
Nath T
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what are the different data driven types?  6
WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP? CTS7
what is test data Wipro3
What is source control?  1
How can we close all webbrowsers which are opened in out desctop?  4
what is the use of VIRTUAL OBJECTS? explain ?  4
Use of environment variables?  3
What is OUTPUT VALUE ? PLZ Explain With Example?  4
Is there any MS Access addin in QTP?  3
what will be the stmt if record any edit box in the Web application ? eSymbiosis2
can anybody give me the links for vb script material  1
Without QTP (or any Testing tool) can we able to test the GUI part of the Applications. for Example generating the Scripts in Notepad and Executing them Using VB. Is it Possible to do so.. Correct me if iam wrong some where. Microsoft8
need clear explanation of actions and functions in qtp with examples?can anyone suggest me gud site for that other than qtp manual?  1
how to parameterise a test with data base table or excel sheet? FCG1
How do you test siebel application using qtp?  1
Suppose there are 100 links in a web page and the number of links will be changing dynamically from time to time. I need code such that every time i had to click on the last link of the web page. Virtusa1
How to retrieve value (data) from notepad using QTP ?  3
where we are going to write the descriptive programming.for example we are invoking qtp application where we are going to write that code  3
what is the extension for the test version of the script? TCS4
My company has recently started using Ajax for building UI and QTP is nor recognizing the drop down list for selection.It recognises it as a general Web Element or Web Table. I have added individual selections from the drop down as web Table. It works as long as the page is not refreshed. I need some help and inputs as to how to make QTP recognise a drop down list for selection. Any help will be appreciated.  1
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com