XenoGuard 4.0 Documentation
Substring
ActionStep Reference » Programming » String Operation » Truncate » Substring
The ActionStep Substring retrieves a specified string based on the given index and length value of the current string and stores the shortened string in Result of the result list.
[-] Hide
- Open the Programming node in the Workspace Explorer.
- Open the String Operation node.
- In the Truncate node, select the Substring ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Source String |
The string to be truncated.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Start Index
|
The starting point for the string.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Index Offset |
The position of the string to be displaced.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Remove Length |
The length of character(s) to be removed.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
An exception occurs when the Start Index value is less than zero or when the Index and Length values do not correspond to the actual string length to be retrieved. |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Result |
Contains the truncated string.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
Example 1 (Retrieve a substring from a variable):
This example gets the last four (4) characters of the local Date variable with Text as a data type. The result of truncating the specified string is then output via Write Text.
See other Truncate operations:
Remove
Trim Whitespace
Trim Whitespace at Start
Trim Whitespace at End
Split
Between