Text Operation

Description

Outputs the result of performing a text operation on the operand(s).

 

Properties

Triggers Immediately

Matches

Returns true if the first operand yields at least one match with the second operand as a pattern, can use the second operand as a search string (default) or a regular expression, both operands must be strings.

Starts with

Returns true if the second operand is a prefix for the first operand, both operands must be strings.

Ends with

Returns true if the second operand is a suffix for the first operand, both operands must be strings.

Slice Text

Returns the substring of the inputted text using the range indicated by the start and end indices. Negative start/end values count backwards from the end of the text.

Text with Format

Takes in a string and an array of values to insert, returns a formatted string. You can find a list of string format specifiers in the Math Expression documentation.

e.g if you enter "I am %d years old" for your Input Text and your first array value is 10, it will output "I am 10 years old".

e.g if you enter "Hello %s" for your Input Text and your first array value is "World", it will output "Hello World".
Character

Returns the character at a position of the inputted string, if invalid index returns empty character.

Subtext

Returns the substring of the inputted text using the range indicated by the start and end indices.

Replace

Returns a string where every pattern match in the inputted string is replaced, can use the second operand as a search string (default) or a regular expression, all three operands must be strings.

Trim

Returns the inputted text with leading and trailing whitespace removed.

Search

Returns the first index where a pattern is found in the inputted text, can use the second operand as a search string (default) or a regular expression, both operands must be strings

Insert

Returns the result of inserting a string into a given position of the input text, if position is invalid, returns the original input text.

Split

Returns the result of splitting the input text with the inputted separator.

Change Case

Returns the uppercase or lowercase version of the text.

 

Outputs

Value

Outputs the result of the text operation.

 

Examples 

For example, you can use replace to update a label as a player's score changes.

 

Relate

Bitwise Operation

Boolean

 

 

0 Comments

Article is closed for comments.