Remove unwanted spaces in a sentence using UiPath | Trim, TrimEnd & TrimStart method


In your automation process, there can be requirements to remove unwanted spaces in the sentence or a word. :face_with_monocle:

For example: If you are fetching a value from a webpage and you are trying to use that to filter a table. So if there are unwanted spaces then it can impact the filtering. So what we can do is remove the unwanted spaces and then pass that value to the filter option.

So unwanted spaces can add at the end or at the starting or in between words as well.

The below short video help to understand how you can use the Trim methods to remove the unwanted spaces in the sentences.

Please share your valuable comments and other approaches that you can suggest. :slightly_smiling_face: