Substring component retrieves a substring from a string. The start character position and length of the substring is specified.
Substring component exposes the Control In, Control Out, Data In, and Data Out ports by default.
|ControlIn||Must be connected to the Control Out port of one or more components.|
|ControlOut||Must be connected to the Control In port of any other component.|
|Data Out||Returns the specified substring.|
To edit the properties of the
Substring component, in the
Properties window, change the required property. You can edit the following properties.
|Search||Search for the respective property.|
|Delay After Execution||Specifies the wait time (in seconds) after the action is executed.|
|Delay Before Execution||Specifies the wait time (in seconds) before the action is executed.|
Let us consider an example.
To retrieve a substring from a string:
In the Toolbox, expand
Utilitiesand then expand
SubStringcomponent and drop it on the Design surface.
Textbox and enter the required string.(ex: Welcome to Intellibot Company.)
startIndexbox and enter the start character position of the substring.The string Index starts from “0”.
Double-click the length box and enter the length of the string that is required to be extracted from the position of the substring start index.
In this Example the Substring is being retrieved form the 11th character of the entire String and the length of the String needs to be extracted from the 11th character is “10” as Intellibot has 10 alphabets.
You can override the existing data source for the
Text and startIndex and LengthData In ports.
To override the existing data source:
Right-click the required Data In port.
Overrideand change the data source.
To learn more about overriding the data source of the data port, refer the Override section.
Showcomponent and drop it on the Design surface.
Connect the control ports and data ports in the activity.
In the toolbar, click
The specified substring is retrieved from the string.