Split Version 6 (Java)

Action group: Text


Description

Converts text into a collection of strings by a specified delimiter

Action icon


Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
TextText to make action onRobin.String
Yes
SeparatorA symbol or string that delimits the substrings in the given string. Space by default.Robin.String
No
Remove empty entriesIf the parameter value is true, then the action will omit empty values from the output collection. The default is false.Robin.BooleantrueNo
Results
ResultThe resulting collection of stringsRobin.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

  1. Create a variable of the collection type to record the result of the "Split" action into it. 


  2. Move the "Split" action to the workspace and set its parameters. 


  3. Move the "Get value by index" action to the workspace and set its parameters. 


  4. Move the "Show message" action to the workspace and set its parameters.


  5. Repeat steps 3 and 4 for values with indexes 1 and 2. 

  6. Launch the robot using the "Start" button in the top panel. 

Result 

3 dialog boxes are displayed sequentially 

  • Нет меток