string_join

This function joins together the string representations of all arguments that are passed to it, inserting the given "delimiter" between each argument. The function returns the joined string.

Arguments that are not strings will have the string() function run on them implicitly. See Conversion From Non-String Types for information on how those data types are converted.

 

Syntax:

string_join(delimiter, value1 [, value2, ... max_val]);

ArgumentTypeDescription
delimiterStringThe string to insert between the values
value1AnyThe first value to join
[, value2, ... max_val]AnyOPTIONAL The other values to join

 

Returns:

String

 

Example:

countdown_message = string_join("... ", "Ready", "Set", "Go!");

The above code calls string_join to create a new string from a few phrases, joined together by the string "... ". The result is stored in a variable named countdown_message.