Get Subtext
Verb: getSubString
Gets a snippet of text based on Start index and Length .
Syntax
getSubString --text(String) --start(Numeric) [--length(Numeric)] (String)=value
Inputs
| Script | Designer | Required | AcceptedTypes | Description |
|---|---|---|---|---|
| --text | Original text | Required | Text | Text where the subtext should be obtained from. |
| --start | Start index | Required | Number | Index that corresponds to the starting position for the Subtext. |
| --length | Length | Optional | Number | Number of characters Subtext should have, after Start index . |
Outputs
| Script | Designer | AcceptedTypes | Description |
|---|---|---|---|
| value | Subtext | Text | The text snippet obtained from Original text . |
Example
Gets a 14 character snippet of text.
defVar --name textEntry --type String --value "IBM Robotic Process Automation. Leading the RPA market in Brazil!"
defVar --name subText --type String
// Get a 14-character excerpt from the input text.
getSubString --text "${textEntry}" --start 1 --length 14 subText=value
logMessage --message "${subText}" --type "Info"
// This example produces the following result:
// "IBM Robotic Pr.
Remarks
All character types are included in Get Subtext, including numbers, special characters, spacing, and tabs.