LUA_INSERT(3) Library Functions Manual LUA_INSERT(3)

lua_insertmoves the top element into the given valid index, shifting up the elements above this index to open space, function indicator [-1, +1, -]

#include <lua.h>

void
lua_insert(lua_State *L, int index);

() moves the top element into the given valid index, shifting up the elements above this index to open space. Cannot be called with a pseudo-index, because a pseudo-index is not an actual stack position.

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_insert() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 14, 2022 Debian