Automation testing QTP with VB Script functions Interview questions


Total available count: 68
Subject - Software Testing
Subsubject - Automation testing QTP with VB Script functions

InStrRev Function?

InStrRev function returns the position of an occurrence of one string within another, from the end of string. 

Syntax: InStrRev(string1, string2[, start[, compare]])

Arguments:
String1: (Required) String expression being searched.
String2: (Required) String expression being searched for.
Start: (Optional) Numeric expression that sets the starting position for each search. If omitted, -1 is used, which means that the search begins at the last character position. If start contains Null, an error occurs.  
Compare: (Optional) Numeric value indicating the kind of comparison to use when evaluating substrings. If omitted, a binary comparison  is performed.   

Example: 

Str="How do you DO ?"
'InStrRev
Print InStrRev(Str,"DO",-1,1)                
Output: 12 , which means  it found the string in 12th position for  textual comparison
Print InStrRev(Str,"do",-1,0)            
Output: 5 , which means  it found the string in 5th position for binary comparison
Print InStrRev(Str,"DO",13,0)            
Output: 12 , which means  it found the string in  12th position for binary comparison
Print InStrRev(Str,"DO",10,1)            
Output: 5 , which means  it found the string in 5th position for  textual comparison 

 




Next 5 interview question(s)

1
Array Function?
2
IsArray Function?
3
LBound Function?
4
UBound Function?
5
DateFunction?

Comments