Skip to main content

The "string_implode" Function

Syntax#

string_implode(array, [limit]);
ArgumentTypeDescription
arrayarrayThe array to combine into a string
[delim]stringOptional: A repeated substring to separate combined items

Description#

Combines the contents of a 1D array into a string, optionally separated by a delimeter character (or substring).

Note that all array contents will be treated as strings. If the array contains pointers to other types of data, the pointer will be written literally rather than writing the contents of the data itself.

Example#

var notes = ["do", "re", "mi", "fa", "so", "la", "ti", "do"];
notes = string_implode(notes, "|");
draw_text(x, y, notes);