String Functions
Before going in note that any time VARNAME or FUNCNAME is written, it means a variable or function in the form Collection@Variable or a literal.
String Functions
String Interpolation
Syntax:
Used inside strings to include variables inside the string, the value of VARNAME1 will be formatted into the string instead of the placeholder
tostring
Syntax:
Returns the string representation of VARNAME2 to VARNAME1. VARNAME2 can be a bool, str, or num to work, otherwise an error will be thrown.
chars
Syntax:
Returns the array of characters in the string VARNAME2 to VARNAME1.
concat
Syntax:
strlen
Syntax:
strslice
Syntax:
Returns a substring of VARNAME2 starting from index VARNAME3 and ending at index VARNAME4, and assigns the result to VARNAME1. The indices are zero based.
replace
Syntax:
Returns a new string where the first occurrence of the substring VARNAME3 in VARNAME2 are replaced with VARNAME4, and assigns the result to VARNAME1. If VARNAME3 is not found in VARNAME2, the original string is returned unchanged.
replace_all
Syntax:
Returns a new string where all occurrences of the substring VARNAME3 in VARNAME2 are replaced with VARNAME4, and assigns the result to VARNAME1. If VARNAME3 is not found in VARNAME2, the original string is returned unchanged.
trim
Syntax:
Returns a new string with all leading and trailing whitespace removed from VARNAME2, and assigns the result to VARNAME1. Whitespace includes spaces, tabs, and newline characters.
split
Syntax:
Splits the string VARNAME2 at each instance of VARNAME3, returning the array of results to VARNAME1
join
Syntax:
Joins each element of the array VARNAME2 with seperator VARNAME3, with VARNAME1 being assigned the result
repeat
Syntax:
Repeats the string VARNAME2, VARNAME3 times returning the result to VARNAME1
contains
Syntax:
Gets if VARNAME2 contains VARNAME3, returning as bool to VARNAME1
to_upper
Syntax:
Returns VARNAME2 in all uppercase to VARNAME1