String.Find(String, Variable) Method

Top 

Description

Searches for the specified stringToFind in the calling String. The search for a match to the specified stringToFind starts at the location specified by startIndex.

 

Timing Precision Mode

This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.

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

 

Method Signature

String.Find(

String stringToFind,


Variable startIndex)

 

 

Arguments

stringToFind


Description:

The string or character to find in the calling String.

 

 

startIndex


Description:

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

Valid Range:

startIndex ≥ 0

 

 

 

Return Value

Type:

number

 

 

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

 

Syntax

myVariable1 = myString1.Find(myString2, myVariable2);

 

 

See also

String Object

String.Find

Parsing Dates and Times

Parsing Arbitrary String Data

Parsing Arbitrary String Data