Text

Text functions are used to

  • Append - Append text to an existing variable.

  • Prepend - Append text to an existing variable.

  • Trim - Trim characters from both sides.

  • Left Trim - Trim characters from the left side.

  • Right Trim - Trim characters from the right side.

  • Start with - Checks if text is present at the beginning

  • Ends with - Checks if text is present at the end.

  • Contains - Checks if text is found within the variable.

Examples

For each of these examples, we will use the variable text with the value of "hello".

Append

Append text to an existing variable.

The variable text becomes: "hello, how are you"

Prepend

Prepend text to an existing variable.

The variable text becomes Person's name hello

Trim

Trim characters from both sides. This is great when the text has special characters in the front and back to separate it. For example: &hello& you can then trim the & off the left and right of the word.

The variable text becomes: llo

Left Trim

Trim characters from the left side.

The variable text becomes: lo

Right Trim

Trim characters from the right side.

The variable text becomes: he

Starts with

Checks if text is present at the beginning. If it does it returns a value of true, if it doesn't it returns a value of false. These values are set in a new variable. In these next examples, we will store it in the result. This version is case-sensitive.

This returns the variable result with the value of false.

Starts with(case-insensitive)

Checks if text is present at the beginning. Now let's try the exact same example as the one above.

This returns the variable result with the value of "true".

Ends with

Checks if text is present at the end.

Ends with(case-insensitive)

Checks if text is present at the end.

This returns the variable result with the value of true.

Contains

Checks if text is found within the variable.

This returns the variable Result with the value of false.

Contains(case-insensitive):

Checks if text is found within the variable. Now let's try the exact same example as the one above.

This returns the variable Result with the value of true.

Last updated