Table.move

From GiderosMobile
Revision as of 22:45, 20 January 2023 by MoKaLux (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2022.3<br/> '''Class:''' table<br/> === Description === Copies elements from table src into table dst. Is equivalent to the multi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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].

(table) = table.move(src,a,b,t,dst)
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