XenoGuard Documentation

Last Index Of

Actions » Programming » String Operation » Range » Last Index Of 

The action Last Index Of searches the last occurrence of a specified character or string and stores the index number in Result of the result list. The Result displays a value of -1 if the character or string is not found.

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

Parameters:

The action 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]

Warning

The search performed by Last Index Of action is case-sensitive.

Results:

The action 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 the index count if the Search String parameter is empty.

Example 1 (Displays the last 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:

First Index Of
Length