Action: Text Manipulation

Revision as of 14:31, 11 June 2021 by JosueGd (talk | contribs)

This action can be used to perform basic string manipulation on a text string.

Substring
Returns a sub-section of the text defined by the supplied start and end indexes. The first character starts at index 0 and the last index is excluded. (To get the first character use values 0 and 1.)
Example Usage
"hello i am using macrodroid app"
To obtain the word Macrodroid we will use the initial position 17 and last position 27 and as a result we will have the value "Macrodroid".

Replace all
Uses a regular expression to replace matching text with the supplied new text.
Example Usage
Source text = Hello, how are you?.
the text to replace is "hello".
the new text is "hi"
The end result will be, "hi, how are you?".


Extract text
Uses a regular expression to match and extract a section from the text.

Upper case
Converts the text to all upper case characters.

Lower case
Converts the text to all lower case characters.

Trim whitespase
Removes any leading/trailing whitespace from the text.