Text
Last updated
Last updated
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.
For each of these examples, we will use the variable text with the value of "hello".
Append text to an existing variable.
The variable text becomes: "hello, how are you"
Prepend text to an existing variable.
The variable text becomes Person's name hello
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
Trim characters from the left side.
The variable text becomes: lo
Trim characters from the right side.
The variable text becomes: he
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.
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".
Checks if text is present at the end.
Checks if text is present at the end.
This returns the variable result
with the value of true.
Checks if text is found within the variable.
This returns the variable Result
with the value of false.
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.