XenoGuard 4.0 Documentation

First Index Of

ActionStep Reference » Programming » String Operation » Range » First Index Of 

The ActionStep First Index Of searches the first occurrence of a specified character or string and stores the index number in Result of the result list. In case the character or string is not found, the Result displays a value of -1.

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the String Operation node.
  3. In the Range node, select the First Index Of ActionStep.

Parameters:

The ActionStep has the following input parameters:


NAME DESCRIPTION
String The string to be checked.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Search String
The string to be searched.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Start Index The position where the search will begin.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

Warning

An exception occurs when the Start Index value is out of range. The value must be non-negative and less than the size of the String parameter.
The search performed by First Index Of ActionStep is case-sensitive.

Results:

The ActionStep returns the following results:


name
description
Result Contains the index position of the specified string.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Information The Result displays a zero (0) value if the Search String parameter is empty.

Example 1 (Displays the first occurrence of a string in a variable):

This example shows the index position of a specified string for the local Info variable with Text as a data type. The result is then output via Message Box.

See other Range operations:

Last Index Of
Length