VirtualString.Find(String, Variable, Variable) Method

Top 

Description

Searches for the specified stringToFind in the calling VirtualString. The search for a match to the specified stringToFind starts at the location specified by startIndex and ends at the location specified by lengthToSearch.

 

Timing Precision Mode

This page describes functionality in nanosecond timing precision mode.

Click here to see the documentation for this object in millisecond timing precision mode.

 

Method Signature

VirtualString.Find(

String stringToFind,


Variable startIndex,


Variable lengthToSearch)

 

 

Arguments

stringToFind


Description:

The string or character to find in the calling VirtualString.

 

 

startIndex


Description:

Specifies the location in the calling VirtualString at which to start looking for the specified stringToFind.

Valid Range:

startIndex ≥ 0

 

 

lengthToSearch


Description:

Specifies the number of characters to search after the startIndex in the calling VirtualString at which to stop looking for the specified stringToFind.

Valid Range:

lengthToSearch ≥ 0

 

 

 

Return Value

Type:

number

 

 

Returns the index of the start of the specified stringToFind in the calling VirtualString. Returns -1 if stringToFind is not found in the specified range of the calling VirtualString. If more than one instance of stringToFind occurs in the calling VirtualString, only the index of the first instance is returned.

 

Syntax

myVariable1 = myString1.ToLowercase().Find(myString2, myVariable2, myVariable3);

 

 

See also

VirtualString Object

VirtualString.Find