Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to count spaces in a given string ex: "this is jagadeesh"
in QTP with simple functional script

Answers were Sorted based on User's Feedback



how to count spaces in a given string ex: "this is jagadeesh" in QTP with simple function..

Answer / jaag@jagadeesh

dim str
str="this is jagadeesh
var=UBound(split(str," ")))
msgbox var

ans
2

Is This Answer Correct ?    19 Yes 2 No

how to count spaces in a given string ex: "this is jagadeesh" in QTP with simple function..

Answer / karthik janahan

Dim str
str = "how to count spaces in a given string"
msgbox (len(replace(str," ","..")) - len(str))

Is This Answer Correct ?    9 Yes 2 No

how to count spaces in a given string ex: "this is jagadeesh" in QTP with simple function..

Answer / ekapop (scnyl)

Hi,
Const sMY_INFO = "this is jagadeesh"

Function GetTotalSpaceFromText(ByVal sText)
Dim iTotal
Dim asInfo

asInfo = Split(sText, " ")
iTotal = UBound(asInfo)

Erase asInfo
GetTotalSpaceFromText = iTotal
End Function

Msgbox "My Text = " & sMY_INFO & vbCrLf & _
"Total Space = " & GetTotalSpaceFromText(sMY_INFO)

Is This Answer Correct ?    5 Yes 2 No

how to count spaces in a given string ex: "this is jagadeesh" in QTP with simple function..

Answer / nitin kumar

str="this is jagadish"
k=split(str," ")
msgbox("spaces are "&ubound(k))

Is This Answer Correct ?    1 Yes 0 No

how to count spaces in a given string ex: "this is jagadeesh" in QTP with simple function..

Answer / nahush

txt = "this is jagadeesh"
no_of_space = len(txt)-len(replace(txt," ",""))


MsgBox no_of_space

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How do u write script in qtp? where do u write?

2 Answers  


what is purpose of automation?

3 Answers  


Explain about Checking Bitmaps?

1 Answers   Crea,


Hi, Where should I get all the test's results If I ran the scripts in Batch run. At the result window I found only last test result. Could any one help me on this?

3 Answers   Livetek,


please any one can explain the keyword driven framework. with gmail example.

0 Answers  


Give me an example where you have used a COM interface in your QTP project?

1 Answers  


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

0 Answers  


waht is puirpose of accesbility Check point? waht is the use of Page and XML check points?

1 Answers  


how qtp will recognise if application is run on many browsers

1 Answers   Cap Gemini,


will QTP accepts javascript?

14 Answers   AppLabs,


Hi, I want to write the script for a webpage. But i didn't added the properties of the objects to the object repository. Without adding the object properties to the object repository, how to write the script. When i am writing the script, Let us say i typed as Browser (""). after selecting ".", if the object is added to the object repository it will display atomatically. But in my case it is not as i didn't added the object properties. How to proceed further in the above mentioned case to write the script manually. Pls let me know if you didn't understand the question.

3 Answers  


Qtp has been installed on my pc but recently ON opening it is giving this error PLEASE REPLY IT IS URGENT IT WAS WORKKING FINE QTPRO.EX THE instruction at "0x7.. ...". referenced memory at "0000....The memory could not be read... Awaiting QTP XPERTS REPly URGENT

0 Answers   Cognizant,


Categories