Returns a new string in which all leading and trailing occurrences of a set of specified characters from the original String object are trimmed off.



  • Input - The original string or String variable.

  • Trim Character - The characters to be removed from the original string.


  • ContinueOnError - The Boolean value to specify whether to continue executing the next activities even if there is an error thrown on this activity.


  • DisplayName - Renames the activity.

  • Result - The resulting string once the characters have been trimmed.


  1. Create a String variable and name it result.
  2. Add a Trim activity inside the initial Sequence. 
  3. In the Trim Result field under Attributes, add the result variable.
  4. In the Trim Input field, write "Robotic Process Automation".
  5. In the Trim Character field, write R.
  6. Under the Trim activity, add a Write Line activity.
  7. In the Write Line Text field, add the result variable. 

    The use case should look as the following screenshot:

This should be the result in the Output panel: