Table.move

From GiderosMobile
Revision as of 15:31, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "<source" to "<syntaxhighlight")

Available since: Gideros 2022.3
Class: table

Description

Copies elements from table src into table dst. Is equivalent to the multiple assignment statement: dst[t], ... = src[a], ..., src[b]. <syntaxhighlight lang="lua"> (table) = table.move(src,a,b,t,dst) </source>

The default for dst is src. The destination range may overlap with the source range
Returns dst for convenience

Parameters

src: (table) the source table
a: (number) start copying at src[a]
b: (number) copy up to and including src[b]
t: (number) copy into dst[t], ....
dst: (table) destination table optional, default value: "src"

Return values

Returns (table) dst, for convenience