Go to: Synopsis. Return value. MEL examples.

Synopsis

int stringArrayInsertAtIndex(int $index, string[] $list, string $item)

Insert $item at $index in the string array $list.

Return value

None

Arguments

Variable Name Variable Type Description
$indexintThe index into $list to add $str at
$liststring[]A list of string values.
$itemstringThe new item to add to $list at $index

MEL examples

  string $array1[] = {"item1", "item2", "item3"};
  // Result: item1 item2 item1 //
  stringArrayInsertAtIndex(1, $array1, "new");
  // Result: 1 //
	print $array1;
	// Result: item1 new item2 item3 //