Split Version 6 (Java)
Action group: Text
Description
Converts text into a collection of strings by a specified delimiter
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Text | Text to make action on | Robin.String | Yes | |
Separator | A symbol or string that delimits the substrings in the given string. Space by default. | Robin.String | No | |
Remove empty entries | If the parameter value is true, then the action will omit empty values from the output collection. The default is false. | Robin.Boolean | true | No |
Results | ||||
Result | The resulting collection of strings | Robin.Collection |
Special conditions of use
None.
Example of use
Task
There is a variable "Introductory text" with value = "Robot 1. Robot 2. Robot 3." It is necessary to convert the text into a collection of strings by delimiter "." and output the obtained values sequentially in dialog boxes.
Solution
Use the actions "Split", "Get value by index" "Show message".
Implementation
- Create a variable of the collection type to record the result of the "Split" action into it.
- Move the "Split" action to the workspace and set its parameters.
- Move the "Get value by index" action to the workspace and set its parameters.
- Move the "Show message" action to the workspace and set its parameters.
- Repeat steps 3 and 4 for values with indexes 1 and 2.
- Launch the robot using the "Start" button in the top panel.
Result
3 dialog boxes are displayed sequentially
Обзор
Инструменты контента