Trim Text Step
The Trim Text step gets rid of extra spaces at the beginning or end of a text variable. This helps clean up your data before you use it for other things.
How to Use the Trim Text Step
Use this step to remove spaces from the start or end of a text variable.
Step 1: Add the Trim Text Step
- Drag and drop the Trim Text step into your process.
- (Optional) Give the step a custom name in the Step name field.
Step 2: Configure Input Parameters
- Source text variable (Required): Pick an existing text variable that has the text you want to trim.
- Trim type (Required): Choose where to remove the spaces:
- Beginning: Removes spaces from the start of the text.
- End: Removes spaces from the end of the text.
- Both: Removes spaces from both the start and end of the text.
Step 3: Define Output Parameter
- Destination trimmed string variable (Required): Type in the name of a new or existing text variable. The trimmed text will go here.
Example:
If your Source text variable is " Hello World " and you pick Trim type as Both, the Destination trimmed string variable will be "Hello World".
Parameters Explained
Step name (Optional)
- A custom name for the process step.
- Example: "Clean User Input"
- Use this to make your process easier to understand.
Source text variable (Required)
- The name of an existing text variable.
- This variable holds the text you want to change.
- Example:
myInputText
Trim type (Required)
- Says which part of the text to trim.
- Options:
Beginning,End,Both - Choose
Bothto remove all spaces from the start and end.
Destination trimmed string variable (Required)
- The name of the variable where the trimmed text will be saved.
- You can use an existing variable or make a new one.
- Example:
cleanedText
Related Articles
- Define Variable Step: Learn how to create new variables.
- Set Variable Value Step: Understand how to change the value of an existing variable.
Need Help?
Can't find what you're looking for? Join the Robotiq Community to get help from other users and the Robotiq team.