> For the complete documentation index, see [llms.txt](https://docs.visualyze.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visualyze.ai/rpa-studio/data/string/trim-text.md).

# Trim Text

Trims the given text

This activity trims the given text.

### Input

* **Text :** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) ![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  Input the text which is to be trimmed.
* **Trim With:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) ![](https://1935494318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M927xRZSEM57y2sBcm3%2Fuploads%2Fgit-blob-20e90e25afa096ee0833e242a7763776d12b4591%2Fimage.png?alt=media)\
  Input the character to be trimmed from the specified text.
* **Trim From:**\
  Select from where the specified text is to be trimmed. The following are the available options.
  * `TrimStart(default)` - Removes all the leading occurrences of the specified character from the given string.
  * `TrimEnd` - Removes all the trailing occurrences of the specified character from the given string.
  * `TrimBoth` - Removes all the trailing as well as the leading occurrences of the specified character from the given string.

### Output

* **Result:** [`String Variable`](/getting-started/rpa-studio/variables.md#string)\
  Stores the trimmed text in the specified [String ](/getting-started/rpa-studio/variables.md#string)variable.
