Manipulate some text

Manipulate and run functions on provided text

With the 'Manipulate some text' block you are able to provide a text and perform text operations like getting the length of the text, trimming text or checking if the text starts or ends with another string.

You can see a list of string methods in the action. For more detailed descriptions check out the mdn web docs for string methods here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String

Text

The text to perform manipulations on. All variables can be used in this field.

Text Operation

The manipulation type with the provided 'Text' field. There are several operations to choose from. Below you can find detailed information about each operation and how it can be used.

The Get Length operation allows you to return the length (number of characters) of the text provided.

Examples

TextResult

Hello World!

12

BotGhost

8

Variable

The Variable field allows you to set the name of the variable that can be used anywhere to retrieve the result of the operation. Make sure that the name of the variable does not correspond to the name of a default variable or of an another action.

You can copy the variable by clicking the clipboard icon in the section right below the optional variable field.

Last updated