Home  Contents

table.insert

Table Lua Commands

SYNOPSIS

table.insert(table,[pos,]value)

DESCRIPTION

Inserts element value at position pos in table, shifting up other elements to open space, if necessary. The default value for pos is n+1, where n is the length of the table, so that a call table.insert(t,x) inserts x at the end of table t.