Skip to main content

The "ds_list_combine" Function

Syntax#

ds_list_combine(id, source, [pos]);
ArgumentTypeDescription
idds_listThe data structure to add new data to
sourceds_listThe data structure to be added
posintegerOptional: The index at which to insert new data (use none for end of list)

Description#

Copies the values of one ds_list into another ds_list. Unlike ds_list_copy, ds_list_combine does not clear the list of existing values.

By default, this script will insert new values at the end of the list. A different position can be optionally supplied instead, ranging from 0 to ds_list_size(id).

Both lists must have already been created before running this script.

Example#

my_list = ds_list_create();
my_list[| 0] = "Hello, ";
my_other_list = ds_list_create();
my_other_list[| 0] = "world!";
ds_list_combine(my_list, my_other_list);