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.
string_join(delimiter, value1 [, value2, ... max_val]);
Argument | Type | Description |
---|---|---|
delimiter | String | The string to insert between the values |
value1 | Any | The first value to join |
[, value2, ... max_val] | Any | OPTIONAL The other values to join |
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.